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
Reindex customer indexer error when add more custom customer attributes #36233
Comments
Hi @manhtranisobar. Thank you for your report.
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
For more details, review the Magento Contributor Assistant documentation. Add a comment to assign the issue: To learn more about issue processing workflow, refer to the Code Contributions.
🕙 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. ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
Hi @engcom-Bravo. Thank you for working on this issue.
|
@magento give me 2.4-develop instance |
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Bravo, here is your Magento Instance: https://9b14b106d51d2a49a1f2530acefab1e2.instances.magento-community.engineering |
@magento give me 2.4-develop instance with edition ee |
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Bravo, here is your Magento Instance: https://9b14b106d51d2a49a1f2530acefab1e2.instances.magento-community.engineering |
@magento give me 2.4.5 instance with edition ee |
Hi @engcom-Lima. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Lima, here is your Magento Instance: https://4f2b67f5526af874f7c27fc529ebe7fc.instances.magento-community.engineering |
Hi @engcom-Lima. Thank you for working on this issue.
|
✔️ Issue confirmed Issue got reproduced in Description: Pre-requisite: Steps to reproduce: Expected result: Actual result: Screenshots: |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-6816 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Lima. Thank you for verifying the issue. |
Hi @manhtranisobar, We got confirmation from internal team. During customer_grid indexing, magento creates a table customer_grid_flat and apply the FULLTEXT indexes to the TEXT, VARCHAR, CHAR columns. On a clean instance of magento 2.4-develop, the default full text indexes present are as below, Total Count being 14. It will also be added to the list of full text indexes as in below, now the total count being 16. If we try to add another text attribute with is_used_in_grid & is_searchable_in_grid to 1. Then on reindexing the following sql error is thrown. The reason being a mysql limitation. Hence we wont be able to have more than 16 customer attributes which are text fields with is_used_in_grid & is_searchable_in_grid to 1 . Thanks. |
Hi @engcom-Bravo |
Preconditions and environment
Steps to reproduce
Create new 3 varchar customer attributes with Use in Search Options is Yes
Go to cli and run command:
bin/magento indexer:reindex customer_grid
Expected result
Reindex successfully
Actual result
Reindex error with MySQL message
Customer Grid index process error during indexation process:
SQLSTATE[42000]: Syntax error or access violation: 1070 Too many key parts specified; max 16 parts allowed, query was: CREATE TABLE IF NOT EXISTS
customer_grid_flat
(entity_id
int UNSIGNED NOT NULL COMMENT 'Entity ID' ,name
text NULL COMMENT 'Name' ,email
varchar(255) NULL COMMENT 'Email' ,group_id
int NULL COMMENT 'Group_id' ,created_at
timestamp NULL default NULL COMMENT 'Created_at' ,website_id
int NULL COMMENT 'Website_id' ,confirmation
varchar(255) NULL COMMENT 'Confirmation' ,created_in
text NULL COMMENT 'Created_in' ,dob
date NULL COMMENT 'Dob' ,gender
int NULL COMMENT 'Gender' ,taxvat
varchar(255) NULL COMMENT 'Taxvat' ,lock_expires
timestamp NULL default NULL COMMENT 'Lock_expires' ,test_1
int NULL COMMENT 'Test_1' ,test_12
int NULL COMMENT 'Test_12' ,test_123
int NULL COMMENT 'Test_123' ,test_1234
int NULL COMMENT 'Test_1234' ,test_12345
int NULL COMMENT 'Test_12345' ,test_123456
int NULL COMMENT 'Test_123456' ,test_t1
varchar(255) NULL COMMENT 'Test_t1' ,test_t12
varchar(255) NULL COMMENT 'Test_t12' ,test_t123
varchar(255) NULL COMMENT 'Test_t123' ,shipping_full
text NULL COMMENT 'Shipping_full' ,billing_full
text NULL COMMENT 'Billing_full' ,billing_firstname
varchar(255) NULL COMMENT 'Billing_firstname' ,billing_lastname
varchar(255) NULL COMMENT 'Billing_lastname' ,billing_telephone
varchar(255) NULL COMMENT 'Billing_telephone' ,billing_postcode
varchar(255) NULL COMMENT 'Billing_postcode' ,billing_country_id
varchar(255) NULL COMMENT 'Billing_country_id' ,billing_region
varchar(255) NULL COMMENT 'Billing_region' ,billing_region_id
int NULL COMMENT 'Billing_region_id' ,billing_street
varchar(255) NULL COMMENT 'Billing_street' ,billing_city
varchar(255) NULL COMMENT 'Billing_city' ,billing_fax
varchar(255) NULL COMMENT 'Billing_fax' ,billing_vat_id
varchar(255) NULL COMMENT 'Billing_vat_id' ,billing_company
varchar(255) NULL COMMENT 'Billing_company' ,PRIMARY KEY (
entity_id
),INDEX
CUSTOMER_GRID_FLAT_GROUP_ID
(group_id
),INDEX
CUSTOMER_GRID_FLAT_CREATED_AT
(created_at
),INDEX
CUSTOMER_GRID_FLAT_WEBSITE_ID
(website_id
),INDEX
CUSTOMER_GRID_FLAT_CONFIRMATION
(confirmation
),INDEX
CUSTOMER_GRID_FLAT_DOB
(dob
),INDEX
CUSTOMER_GRID_FLAT_GENDER
(gender
),INDEX
CUSTOMER_GRID_FLAT_TEST_1
(test_1
),INDEX
CUSTOMER_GRID_FLAT_TEST_12
(test_12
),INDEX
CUSTOMER_GRID_FLAT_TEST_123
(test_123
),INDEX
CUSTOMER_GRID_FLAT_TEST_1234
(test_1234
),INDEX
CUSTOMER_GRID_FLAT_TEST_12345
(test_12345
),INDEX
CUSTOMER_GRID_FLAT_TEST_123456
(test_123456
),INDEX
CUSTOMER_GRID_FLAT_BILLING_COUNTRY_ID
(billing_country_id
),FULLTEXT
FTI_059BA2EF3C88ED0DA4E84A263AEFD399
(name
,email
,created_in
,taxvat
,test_t1
,test_t12
,test_t123
,shipping_full
,billing_full
,billing_firstname
,billing_lastname
,billing_telephone
,billing_postcode
,billing_region
,billing_city
,billing_fax
,billing_company
)) COMMENT='customer_grid_flat' ENGINE=innodb charset=utf8 COLLATE=utf8_general_ci
Additional information
No response
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: