[SERVER-49897] Insert no-op entries into oplog buffer collections for resharding so resuming is less wasteful Created: 25/Jul/20  Updated: 29/Oct/23  Resolved: 30/Jul/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.0.4, 5.1.0-rc0

Type: Task Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Janna Golden
Resolution: Fixed Votes: 0
Labels: PM-234-O-unspecialized
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
depends on SERVER-49895 Expose getLatestOplogTimestamp() in a... Closed
depends on SERVER-53534 Support including postBatchResumeToke... Closed
depends on SERVER-49893 Create oplog fetcher for resharding Closed
is depended on by SERVER-58938 Update DBClientCursor::_postBatchResu... Closed
Problem/Incident
causes SERVER-59811 ReshardingOplogFetcher can see the po... Closed
causes SERVER-60774 Resharding may apply through reshardF... Closed
Related
related to SERVER-51246 Write a noop into the oplog buffer af... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Sharding 2021-07-12, Sharding 2021-07-26, Sharding 2021-08-09
Participants:
Story Points: 2

 Description   

Insert a no-op entry with

{_id: {
    clusterTime: <latest oplog timestamp from donor's cursor response>,
    ts: <latest oplog timestamp from donor's cursor response>,
}}

into the oplog buffer collection on the recipient shard. The <latest oplog timestamp from donor's cursor response> refers to the getLatestOplogTimestamp() value exposed in aggregation cursor command responses on oplog from SERVER-49895.

The no-op entry should be inserted using its own storage transactions and its Collection::insertDocument() call must be allowed to fail with a duplicate key error. This is because it is possible for the donor shard to not have generated any more oplog entries since the last getMore the recipient shard sent and therefore for the same getLatestOplogTimestamp() to be returned.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 21/Sep/21 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-49897 Insert no-op entries into oplog buffer collections for resharding so resuming is less wasteful

(cherry picked from commit 298d02f7432b84df2a955addc5bcdf6a366c6645)
Branch: v5.0
https://github.com/mongodb/mongo/commit/42868935646547bceefefb764bdf9b94ea1812c3

Comment by Githook User [ 29/Jul/21 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-49897 Insert no-op entries into oplog buffer collections for resharding so resuming is less wasteful
Branch: master
https://github.com/mongodb/mongo/commit/298d02f7432b84df2a955addc5bcdf6a366c6645

Generated at Thu Feb 08 05:21:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.