Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

queue_poison_pill table missing primary key #39239

Open
1 of 5 tasks
ckshen8 opened this issue Oct 6, 2024 · 1 comment
Open
1 of 5 tasks

queue_poison_pill table missing primary key #39239

ckshen8 opened this issue Oct 6, 2024 · 1 comment
Labels
Issue: ready for confirmation Reported on 2.4.7-p2 Indicates original Magento version for the Issue report.

Comments

@ckshen8
Copy link

ckshen8 commented Oct 6, 2024

Preconditions and environment

This is the same issue as #33822 , that was originally raised by @sych74, commented by @siliconalchemy and looked into by @engcom-Echo and was closed without resolution.

  • Magento version: 2.4.7p2
  • Ubuntu 24.04
  • MySQL Galera Percona XtraDB 8.0
  • PHP 8.3

Steps to reproduce

Prepare database:

mysql -u root -p
CREATE DATABASE magentodb;
CREATE USER 'magento'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
GRANT ALL ON `magentodb`.* TO 'magento'@'localhost';
CREATE USER 'magento'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
GRANT ALL ON `magentodb`.* TO 'magento'@'%';
EXIT

Install Magento prequisites- database, PHP, Composer, RabbitMQ, Redis, Elasticsearch

Download Magento Community repository:

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.4.7-p2 /var/www/html/magento

Set permissions:

cd /var/www/html/magento
find . -type f -exec chmod 644 {} \;            
find . -type d -exec chmod 755 {} \;        
chmod -Rf 777 var
chmod -Rf 777 pub/static
chmod -Rf 777 pub/media
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
chmod -Rf 775 bin

Install Magento
php bin/magento setup:install --base-url=<url> --db-host=ip:port --db-name=magentodb --db-user="magento" --db-password=<db password> --admin-firstname="xx" --admin-lastname="yy" --admin-email="[email protected]" --admin-user="[email protected]" --admin-password="Testing123%567" --use-rewrites=1 --backend-frontname="admin" --db-prefix=mage_ --timezone=America/Los_Angeles --currency=USD --language=en_US --session-save="redis" --search-engine=elasticsearch8 --elasticsearch-host=<ip> --elasticsearch-port=9200 --elasticsearch-index-prefix=magento2 --amqp-host=<ip> --amqp-port="5672" --amqp-user="magentorabbit" --amqp-password="<magentorabbit password>" --amqp-virtualhost="magento" --amqp-ssl=

Expected result

Magento installed successfully.

Actual result

Magento not installed successfully.

[Progress: 585 / 1448]
Module 'Magento_MessageQueue':
Running schema recurring...
In Mysql.php line 109:
                                                                                                                                                                                       
  SQLSTATE[HY000]: General error: 1105 Percona-XtraDB-Cluster prohibits use of DML command on a table (magentodb.mage_queue_poison_pill) without an explicit primary key with pxc_str  
  ict_mode = ENFORCING or MASTER, query was: INSERT INTO `mage_queue_poison_pill` (`version`) VALUES (?)                                                                               
                                                                                                                                                                                       

In Mysql.php line 90:
                                                                                                                                                                                       
  SQLSTATE[HY000]: General error: 1105 Percona-XtraDB-Cluster prohibits use of DML command on a table (magentodb.mage_queue_poison_pill) without an explicit primary key with pxc_str  
  ict_mode = ENFORCING or MASTER                                                                                                                                                       

Additional information

pxc_strict_mode of the Galera cluster is set to ENFORCING

Per Percona's detailed explanation, the solution is to have primary keys on every table, including queue_poison_pill.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Copy link

m2-assistant bot commented Oct 6, 2024

Hi @ckshen8. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce.


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@engcom-Bravo engcom-Bravo added the Reported on 2.4.7-p2 Indicates original Magento version for the Issue report. label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: ready for confirmation Reported on 2.4.7-p2 Indicates original Magento version for the Issue report.
Projects
Status: Ready for Confirmation
Development

No branches or pull requests

2 participants