...
initial_sync_replSetGetStatus.js waits for the initial syncing node to transition into SECONDARY state and then assert the 'replSetGetStatus' command reply does not contain 'initialSync' field. However it's possible that the node transitioned to SECONDARY state during the onCompletion callback before resetting the _initialSyncState. When responding to the 'replsetGetStatus' command, if _initialSyncState is not reset, the response will still include the `initialSyncStatus` field, causing the assertion to fail. One solution is to add a fail point after resetting _initialSyncState and wait in the test. Another option can be using assert.soon(), but using fail point can test it a more deterministic manner.
JIRAUSER1259052 commented on Wed, 6 Oct 2021 18:17:10 +0000: 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! xgen-internal-githook commented on Wed, 21 Jul 2021 02:07:46 +0000: Author: {'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'} Message: SERVER-58258 Fix race between 'replSetGetStatus' request and initial syncer clearing state. (cherry picked from commit f4860f196c4c7cc335955361865f3511d0c73606) Branch: v4.2 https://github.com/mongodb/mongo/commit/af1310cbf969eceb0ca139f2af94b8806f79de3c xgen-internal-githook commented on Tue, 20 Jul 2021 23:17:04 +0000: Author: {'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'} Message: SERVER-58258 Fix race between 'replSetGetStatus' request and initial syncer clearing state. (cherry picked from commit f4860f196c4c7cc335955361865f3511d0c73606) Branch: v4.4 https://github.com/mongodb/mongo/commit/744675fe9ca246317dc8d68aaeb2e9070c06989c xgen-internal-githook commented on Tue, 20 Jul 2021 21:55:50 +0000: Author: {'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'} Message: SERVER-58258 Fix race between 'replSetGetStatus' request and initial syncer clearing state. (cherry picked from commit f4860f196c4c7cc335955361865f3511d0c73606) Branch: v5.0 https://github.com/mongodb/mongo/commit/fca893f0bd16ae1d2d80e51ef88a912c8230f0f2 xgen-internal-githook commented on Tue, 6 Jul 2021 18:11:43 +0000: Author: {'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'} Message: SERVER-58258 Fix race between 'replSetGetStatus' request and initial syncer clearing state. Branch: master https://github.com/mongodb/mongo/commit/f4860f196c4c7cc335955361865f3511d0c73606