[SERVER-62356] shardCollection for time-series is not done under the critical section Created: 04/Jan/22 Updated: 29/Oct/23 Resolved: 14/Sep/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.2.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Haley Connelly | Assignee: | Paolo Polato |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | time-series, timeseries_DDL_bug | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Sprint: | QE 2022-04-04, QE 2022-02-07, QE 2022-02-21, QE 2022-03-07, QE 2022-03-21, QE 2022-01-24, QE 2022-04-18, QE 2022-05-02, QE 2022-05-16, Sharding EMEA 2022-06-27, Sharding EMEA 2022-07-11, Sharding EMEA 2022-07-25, Sharding EMEA 2022-08-08, Sharding EMEA 2022-08-22, Sharding EMEA 2022-09-05, Sharding EMEA 2022-09-19 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 169 | ||||||||||||||||||||
| Description |
|
When sharding a time-series collection, we perform a catalog lookup and perform some extra steps. However, this state can change before we actually enter the critical section for the operation. |
| Comments |
| Comment by Githook User [ 16/Sep/22 ] |
|
Author: {'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}Message: |
| Comment by Githook User [ 14/Sep/22 ] |
|
Author: {'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}Message: |
| Comment by Githook User [ 27/Jul/22 ] |
|
Author: {'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}Message: Revert " This reverts commit ab2ced056ac09ea256cc4ff00fb2cbd0344f622a. |
| Comment by Githook User [ 26/Jul/22 ] |
|
Author: {'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}Message: |
| Comment by Githook User [ 18/May/22 ] |
|
Author: {'name': 'Rui Liu', 'email': 'rui.liu@mongodb.com', 'username': 'lriuui0x0'}Message: Revert " This reverts commit a3efbb9a26eba7f40392b3921ed0162c80b6b6d1. |
| Comment by Githook User [ 16/May/22 ] |
|
Author: {'name': 'Rui Liu', 'email': 'rui.liu@mongodb.com', 'username': 'lriuui0x0'}Message: |
| Comment by Rushan Chen [ 05/Apr/22 ] |
|
Assigning to Rui/ arun.banala, excluding other DDL during shard TS collection is likely acceptable.What do you think? Or the concern is the uasserts in that block? Still good idea to get it reviewed by sharding. |
| Comment by Arun Banala [ 24/Feb/22 ] |
|
This does look like a problem, if there is a create and shardCollection command running for the same namespace in parallel. It doesn't feel like taking a lock on CollectionCatalog would work here. We can consider moving this whole time-series logic into the DDLCoordinator. We should also get guidance from Sharding team, as the DDLCoordinator itself doesn't let other DDL operations run in parallel. |
| Comment by Rushan Chen [ 19/Jan/22 ] |
|
Hi Arun, could you please take a look and make sure the original shardCollection for time series is thread safe? |
| Comment by Kyle Suarez [ 14/Jan/22 ] |
|
bernard.gorman or rushan.chen, can someone from the sharding time-series collection team take a look at this bug? |