[SERVER-82085] Race condition between $out to timeseries and shard collection Created: 11/Oct/23 Updated: 23/Jan/24 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 7.0.0, 7.2.0-rc0, 7.1.0, 7.3.0-rc0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jordi Serra Torrens | Assignee: | Yujin Kang Park |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | car-qw | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Catalog and Routing
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v7.3
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 132 | ||||||||||||||||
| Story Points: | 3 | ||||||||||||||||
| Description |
|
At the end of a $out operation, the temporary collection is renamed to the output namespace. For timeseries collections it is the buckets collection what gets renamed. It would be wrong that this rename causes a buckets collection test.system.buckets.foo to appear when there's already a test.foo sharded collection. To prevent that, _internalRenameIfOptionsAndIndexesMatch has a check to ensure that the destination collection is not sharded. However, the implementation (here on master, andhere on v7.0) of it is wrong for timeseries: It only checks that the buckets collection is not sharded, rather than the undelying view namespace |