[SERVER-81028] Incorrect $listCatalog behavior in presence of a concurrent collection rename in v7.0 Created: 13/Sep/23 Updated: 11/Dec/23 Resolved: 16/Oct/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 7.0.0 |
| Fix Version/s: | 7.1.1, 7.2.0-rc0, 7.0.4, 6.0.13 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Craven Huynh | Assignee: | Jordi Olivares Provencio |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Storage Execution EMEA
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Requested: |
v7.1, v7.0, v6.0, v5.0, v4.4
|
||||||||||||
| Steps To Reproduce: | To reproduce outside of Mongosync:
- On mongosh 2, rename the collection
The infinite loop in mongosh 1 will exit. In v6.0.8, the infinite loop exits with a CollectionUUIDMismatch error as expected, but v.7.0.0, the infinite loop exits because the server returns an empty list of index.
|
||||||||||||
| Sprint: | Execution EMEA Team 2023-10-16, Execution EMEA Team 2023-10-30 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
Mongosync uses $listCatalog to list indexes belonging to collections as follows:
If the collection gets renamed while the aggregation pipeline is running, Mongosync expects to get a CollectionUUIDMismatch error for the server. That is the behavior for v6.0.8. In v7.0, the result of the aggregation pipeline is actually empty, which causes Mongosync to incorrectly believe that there is no index on the collection. |
| Comments |
| Comment by Githook User [ 30/Nov/23 ] |
|
Author: {'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}Message: |
| Comment by Jordi Olivares Provencio [ 29/Nov/23 ] |
|
Note that $listCatalog is only present on 6.0+. Cancelling backport to 5.0 and 4.4 as this cannot be used there. |
| Comment by Jordi Olivares Provencio [ 14/Nov/23 ] |
|
Requesting backports to 6.0 and older since the query can return invalid results in the presence of concurrent renames. |
| Comment by Huan Li [ 09/Nov/23 ] |
|
Please be aware that since this change, Mongosync has been experiencing many test failures with error message from the server "failed to apply create in a causally consistent session: (CollectionUUIDMismatch) PlanExecutor error during aggregation :: caused by :: Collection UUID does not match that specified" I have linked one of the Mongosync BF ticket REP-3580 above. I think we should take another look at this fix. craven.huynh@mongodb.com is out this week, please let us know if you want help with the investigation. |
| Comment by Githook User [ 08/Nov/23 ] |
|
Author: {'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}Message: |
| Comment by Githook User [ 06/Nov/23 ] |
|
Author: {'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}Message: |
| Comment by Githook User [ 16/Oct/23 ] |
|
Author: {'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}Message: |
| Comment by Jordi Olivares Provencio [ 13/Oct/23 ] |
|
Requesting backports to 7.0 and 7.1 since it affects those versions. |
| Comment by Jordi Olivares Provencio [ 11/Oct/23 ] |
|
After running bisect on this, I identified the issue to come from the PIT catalog lookup project ( |