[SERVER-80104] Sharded time-series buckets should allow deleteOne against `_id` Created: 15/Aug/23  Updated: 29/Oct/23  Resolved: 17/Aug/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Felipe Gasper Assignee: Yuhong Zhang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
related to SERVER-80786 [7.0] Sharded time-series buckets sho... Closed
is related to SERVER-75921 Remove conflicting error message for ... Closed
Assigned Teams:
Storage Execution NAMER
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0, v6.0
Sprint: Execution NAMR Team 2023-08-21
Participants:

 Description   

The logic given in SERVER-75921 for why updates/deletes against sharded time-series collections don’t apply when updating the raw time-series buckets collection. Nonetheless, attempts to do so lead to errors like:

A single delete on a sharded time-series collection must contain the shard key (and have the simple collation).

Mongosync needs this in order to apply this algorithm for accommodating certain race conditions.



 Comments   
Comment by Yuhong Zhang [ 06/Sep/23 ]

I filed SERVER-80786 as a 7.0 only fix to first unblock mongosync since the backport has a dependency of a code change from PM-1632.

jason.zhang@mongodb.com the 7.0 only fix could cause some troubles when you do the backport of PM-1632. We might need to backport SERVER-78370 and SERVER-80104 together then. Just giving you a headsup first.

Comment by Felipe Gasper [ 31/Aug/23 ]

yuhong.zhang@mongodb.com Apologies for my delay. I can confirm that 6.0 doesn’t show the problem. Thank you.

Comment by Yuhong Zhang [ 22/Aug/23 ]

felipe.gasper@mongodb.com There are some complications with the 7.0 backport since it has dependency on another project that landed in 7.1. I'll need to think more about it and figure out the cleanest solution.

The bug was introduced in 7.0. Can you confirm this was broken on 6.0?

Comment by Felipe Gasper [ 22/Aug/23 ]

yuhong.zhang@mongodb.com and pavithra.vetriselvan@mongodb.com: We see that there’s a backport pending for v7. That’s fantastic. Can you confirm that this is targeted for backport to 7.0.1?

I also see that the v6 backport was declined. Was this intentional? TAR envisions mongosync’s time-series support for v6, but without this fix that won’t work. Are you able to backport this change to v6.0.10?

Thank you!

Comment by Githook User [ 17/Aug/23 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'yuhong.zhang@mongodb.com', 'username': 'YuhongZhang98'}

Message: SERVER-80104 Differentiate buckets and user time-series collections for sharded delete targeting
Branch: master
https://github.com/mongodb/mongo/commit/09e760d6ca826bcebd2fa1e38969145d7b26f04f

Comment by Yuhong Zhang [ 17/Aug/23 ]

Limiting the scope of this ticket to just deleteOne to simplify the backport process since update and findAndModify were not added in 7.0. Tracking updateOne and findAndModify in SERVER-80189 and SERVER-80190.

Generated at Thu Feb 08 06:42:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.