Open ioweb-gr opened 3 years ago
Hi @ioweb-gr. Thank you for your report. To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
Please, add a comment to assign the issue: @magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.
:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
@magento give me 2.4-develop instance
Hi @victortodoran. Thank you for your request. I'm working on Magento instance for you.
Hi @victortodoran, here is your Magento Instance: https://cfb78538b62dfd19735be4d64c74c70e-2-4-develop.instances.magento-community.engineering Admin access: https://cfb78538b62dfd19735be4d64c74c70e-2-4-develop.instances.magento-community.engineering/admin_12d4 Login: 96086e41 Password: 56deba2c3780
Hi @engcom-Delta. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @ioweb-gr , I tried with 3 stores on Magento 2.4.2 ,unfortunately I could not find this issue reproducible. found that order numbers are generated like Store1--> 1000000001,1000000002,1000000003..etc Store 2--> 2000000001,2000000002,2000000003..etc Store 3 --> 3000000001,3000000002,3000000003..etc.
Hence, added the lable 'Needs update'.
Thanks
Hi you didn't read the description correctly. You need to either have migrated data from M1 which used one less digit than M2 or you need to fill all the order sequence numbers for store 1. Finally you need 10 stores
The collission comes when the first shop fills all available digits with orders and adds an extra digit. For example for store with Id 1 and sequence 1000000001
When you place order 1999999999
the next in queue is 10000000001
and this number is now in the sequence of store Id 10's first order
Hi @ioweb-gr , We can not place those many orders to verify this issue .Hence request to provide your inputs for further action on this ticket.
Thanks
@engcom-Delta Indeed I know it's not realistic that someone will place so many orders to reproduce the issue in a sample instance as it would require filling up all the numbers. However the issue will become apparent if you create a few orders in store id = 1 and store = 10 on Magento 1 then migrate. The first order will cause a collision.
The only sensible way to reproduce this issue is to
However I do think that you don't even have to place that many orders on the website to replicate. It's alogical flaw that you can verify in an excel file by adding the sequence numbers.
Hi @ioweb-gr , Thanks for confirming , we tried to understand logical flaw in this . Hence adding label feature request.
Regards,
Sure sounds great. As long as the issue is confirmed. Although I think it's a bug not a new feature. Increment ids should be unique per order and having a collission is a problem.
Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x
, ^Area:.*
Once all required labels are present, please add Issue: Confirmed
label again.
:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-1292 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Delta. Thank you for verifying the issue.
Issue Available: @engcom-Delta, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
Hi @engcom-Lima. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
@magento give me 2.4-develop instance
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://560743bdad84aa2c111957670d6008ed.instances.magento-community.engineering Admin access: https://560743bdad84aa2c111957670d6008ed.instances.magento-community.engineering/admin_014c Login: 3c503984 Password: 828cb5146e98
Hi @ioweb-gr i have tried to reproduce the issue. I have used performance fixtures in which around 50k orders got created with 10 store views. Here, didn't found any increment_id which got duplicated.Please refer this video for your reference.
Hi @ioweb-gr i have tried to reproduce the issue. I have used performance fixtures in which around 50k orders got created with 10 store views. Here, didn't found any increment_id which got duplicated.Please refer this video for your reference.
Hi @engcom-Lima Please read comment https://github.com/magento/magento2/issues/33457#issuecomment-910233368
You need to place enough orders on store id = 1 to fill all available increment digits in order to make it shift and add one extra digit. 50k orders is too little to cover all available digits.
To sum it up, I noticed the issue exists because M1 used one less digit, so after migration, this collision became apparent.
Put the numbers in an excel file and start filling up the digits in one column and add the store id = 10 increment ids in the second column. You'll notice the collision.
:heavy_check_mark: Issue confirmed
Issue got reproduced in 2.4-develop branch.
Description: Order ids getting duplicated while creating orders from different stores.
Pre-requisite:
Steps to reproduce:
ALTER TABLE sequence_order_1 AUTO_INCREMENT=1999999999;
Expected result: Order id should not get duplicated. Actual result: Order id got duplicated.
Screenshot: Hence,confirming the issue.
:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-5912 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Lima. Thank you for verifying the issue.
Issue Available: @engcom-Lima, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
Thanks for confirming the issue. Up until now there is no way to work around this, only with third party modules which will alter the sequences but they are all slow and prone to other errors including more collisions.
The easiest way to fix this would be to introduce the store id as a prefix with a separator character instead of a plain number
The way the increment id is implemented, it has the potential of colliding. Currently the increment id has a prefix of the store id of the order e.g.
for store id = 5 we have an increment id of 5-----------X for store id = 1 we have an increment id of 1-----------X for store_id = 10 we have an increment id of 10----------X
The potential to collide comes if you generate orders in store 1 to fill up all the available digits after the prefix. When the sequence increases it will collide with the store_id 10s increment id.
This can occur no matter how many digits you have on the increment id for cases like 2 with 20 3 with 30 4 with 40 etc etc etc
The number of orders to actually make them collide is huge to replicate it however it can occur. Actually we had an instance from a migrated website where this exact issue occured because the previous magento version in the orders, it had one less padding 0 on the increment id. So it caused a collision on the first order.
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
The problem has a really easy logical solution, adding a symbol separator to the store id prefix
e.g. from
1000002300 -> 10-00002300 1000002300 -> 1-000002300
This is actually a serious issue in migrated websites when syncronizing with 3rd party systems like ERPs and also for coherence on the system. When searching past orders it can give the wrong data.
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.