The DonorStateMachine and RecipientStateMachine log message for state transitions are reporting the new state as the oldState attribute. This is because the _donorDoc.getState() and _recipientDoc.getState() refer to the state after the document has been updated in-memory. The ReshardingCoordinator happens to update the document in-memory after logging the message.
[js_test:resharding_clones_initial_data] 2021-02-10T17:07:17.126+0000 c21774| 2021-02-10T17:07:17.124+00:00 I RESHARD 5343001 [ReshardingCoordinatorService-0] "Transitioned resharding coordinator state","attr":{"newState":"initializing","oldState":"unused","ns":"reshardingDb.coll","collectionUUID":{"uuid":{"$uuid":"515a07af-37cc-4088-93fa-a89f0c23b5bc"}},"reshardingUUID":{"uuid":{"$uuid":"a8500551-7e7b-4d0a-8541-0aecab3098ee"}}} ... [js_test:resharding_clones_initial_data] 2021-02-10T17:07:17.268+0000 d21770| 2021-02-10T17:07:17.256+00:00 I RESHARD 5279505 [ReshardingDonorService-0] "Transitioned resharding donor state","attr":{"newState":"donating-initial-data","oldState":"donating-initial-data","ns":"reshardingDb.coll","collectionUUID":{"uuid":{"$uuid":"515a07af-37cc-4088-93fa-a89f0c23b5bc"}},"reshardingUUID":{"uuid":{"$uuid":"a8500551-7e7b-4d0a-8541-0aecab3098ee"}}} ... [js_test:resharding_clones_initial_data] 2021-02-10T17:07:17.388+0000 d21772| 2021-02-10T17:07:17.387+00:00 I RESHARD 5279506 [ReshardingRecipientService-1] "Transitioned resharding recipient state","attr":{"newState":"cloning","oldState":"cloning","ns":"reshardingDb.coll","collectionUUID":{"uuid":{"$uuid":"515a07af-37cc-4088-93fa-a89f0c23b5bc"}},"reshardingUUID":{"uuid":{"$uuid":"a8500551-7e7b-4d0a-8541-0aecab3098ee"}}}
- related to
-
SERVER-54000 Make errors propagate from the ReshardingCoordinator to participants
- Closed