-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
ALL
-
v5.0
-
Sharding 2021-07-12
-
1
The changes from SERVER-57266 are an on-disk format change to resharding's donor, recipient, and coordinator documents and won't be present in MongoDB 5.0.0. It must be possible for a user to upgrade from binVersion 5.0 to 5.1 while keeping their featureCompatibilityVersion as 5.0 and continue to run an ongoing resharding operation. Therefore, binVersion 5.1 must be prepared for the metrics field to not be present in the resharding's donor, recipient, and coordinator documents.
- https://github.com/mongodb/mongo/blob/e1f9a3922d20886691e4c22c4fa63ba81a89b3d7/src/mongo/db/s/resharding/donor_document.idl#L73
- https://github.com/mongodb/mongo/blob/e1f9a3922d20886691e4c22c4fa63ba81a89b3d7/src/mongo/db/s/resharding/recipient_document.idl#L85
- https://github.com/mongodb/mongo/blob/e1f9a3922d20886691e4c22c4fa63ba81a89b3d7/src/mongo/db/s/resharding/coordinator_document.idl#L122
The current behavior causes binVersion 5.1 secondaries (in FCV 5.0) to crash when receiving an update oplog entry from a binVersion 5.0 primary because the DonorStateEnum::kDonatingInitialData state transition causes secondaries to attempt to parse the updated donor state document to pin the oldest_timestamp in WiredTiger.
[js_test:resharding_clones_initial_data] d21023| 2021-07-02T22:30:09.680+00:00 F REPL 21235 [OplogApplier-0] "Failed to apply batch of operations","attr":{"numOperationsInBatch":1,"firstOperation":{"oplogEntry":{"op":"u","ns":"config.localReshardingOperations.donor","ui":{"$uuid":"60221813-d9de-489b-8969-d8e3357d9906"},"o":{"$v":2,"diff":{"u":{"mutableState":{"state":"donating-initial-data","minFetchTimestamp":{"$timestamp":{"t":1625265009,"i":94}},"bytesToClone":124,"documentsToClone":2}}}},"o2":{"_id":{"$uuid":"effff212-ee94-4dfa-a97c-5ebc55aafb9a"}},"ts":{"$timestamp":{"t":1625265009,"i":95}},"t":1,"v":2,"wall":{"$date":"2021-07-02T22:30:09.633Z"}}},"lastOperation":{"oplogEntry":{"op":"u","ns":"config.localReshardingOperations.donor","ui":{"$uuid":"60221813-d9de-489b-8969-d8e3357d9906"},"o":{"$v":2,"diff":{"u":{"mutableState":{"state":"donating-initial-data","minFetchTimestamp":{"$timestamp":{"t":1625265009,"i":94}},"bytesToClone":124,"documentsToClone":2}}}},"o2":{"_id":{"$uuid":"effff212-ee94-4dfa-a97c-5ebc55aafb9a"}},"ts":{"$timestamp":{"t":1625265009,"i":95}},"t":1,"v":2,"wall":{"$date":"2021-07-02T22:30:09.633Z"}}},"failedWriterThread":5,"error":"Location40414: BSON field 'Resharding.metrics' is missing but a required field"} [js_test:resharding_clones_initial_data] d21023| 2021-07-02T22:30:09.681+00:00 F - 23095 [OplogApplier-0] "Fatal assertion","attr":{"msgid":34437,"error":"Location40414: BSON field 'Resharding.metrics' is missing but a required field","file":"src/mongo/db/repl/oplog_applier_impl.cpp","line":343}
- is caused by
-
SERVER-57266 Create IDL representations for resharding metrics time intervals.
- Closed
- is depended on by
-
SERVER-58355 Fix disabled Resharding tests failing in multiversion suites due to changing latest release to 5.1
- Closed
-
SERVER-56366 Update FCV constants in server code base following 5.0 branch
- Closed