[SERVER-61440] Race in tenant_migration_recipient_current_op.js Created: 12/Nov/21  Updated: 29/Oct/23  Resolved: 15/Nov/21

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 5.2.0, 5.1.1

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
is related to SERVER-51246 Write a noop into the oplog buffer af... Closed
is related to SERVER-55141 Add receiveStart and numOpsApplied to... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.1
Sprint: Server Serverless 2021-11-15, Server Serverless 2021-11-29
Participants:
Linked BF Score: 37

 Description   

Since there are no writes on the donor during migration, the recipient can enter "consistent" before applying any oplog entries:

    // If this optime has already passed, just return a ready future.
    if (_lastAppliedOpTimesUpToLastBatch.donorOpTime >= donorOpTime ||
        _beginApplyingAfterOpTime >= donorOpTime) {
        return SemiFuture<OpTimePair>::makeReady(_lastAppliedOpTimesUpToLastBatch);
    }

The tenant_migration_recipient_current_op.js test waits for the recipient to be "consistent" and asserts its currentOp's numOpsApplied is ≥ 1, which may be false if the recipient took this shortcut.



 Comments   
Comment by Githook User [ 16/Nov/21 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: SERVER-61440 Race in tenant_migration_recipient_current_op.js

(cherry picked from commit f0095b9c20c472d9ba53d4c1f147d18b35bd27f4)
Branch: v5.1
https://github.com/mongodb/mongo/commit/5f3c1897af8571355124a1c58774eda5d580c9f5

Comment by Githook User [ 15/Nov/21 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: SERVER-61440 Race in tenant_migration_recipient_current_op.js
Branch: master
https://github.com/mongodb/mongo/commit/f0095b9c20c472d9ba53d4c1f147d18b35bd27f4

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