[SERVER-37573] Remove Raciness in wildcard multiversion test Created: 11/Oct/18  Updated: 29/Oct/23  Resolved: 22/Oct/18

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 4.1.5

Type: Bug Priority: Major - P3
Reporter: Ian Boros Assignee: Ian Boros
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2018-10-22
Participants:
Linked BF Score: 0

 Description   

I believe there is a race in this code. If the secondary which starts up has a chance to start initial sync before stopSet() is called, then the node may try to sync from another node which is getting shut down. This may cause initial sync to fail with the error message such as:

[js_test:wildcard_index_feature_compatability_version] 2018-10-08T07:58:48.546+0000 d20271| 2018-10-08T07:58:48.545+0000 I NETWORK  [signalProcessingThread] shutdown: going to close listening sockets...
[js_test:wildcard_index_feature_compatability_version] 2018-10-08T07:58:48.546+0000 d20271| 2018-10-08T07:58:48.545+0000 E REPL     [replication-0] Initial sync failed, shutting down now. Restart the server to attempt a new initial sync.
[js_test:wildcard_index_feature_compatability_version] 2018-10-08T07:58:48.546+0000 d20271| 2018-10-08T07:58:48.545+0000 I NETWORK  [signalProcessingThread] removing socket file: /tmp/mongodb-20271.sock
[js_test:wildcard_index_feature_compatability_version] 2018-10-08T07:58:48.546+0000 d20271| 2018-10-08T07:58:48.545+0000 F -        [replication-0] Fatal assertion 40088 HostUnreachable: error while getting base rollback ID :: caused by :: Connection was closed at src/mongo/db/repl/replication_coordinator_impl.cpp 705
[js_test:wildcard_index_feature_compatability_version] 2018-10-08T07:58:48.546+0000 d20271| 2018-10-08T07:58:48.545+0000 F -        [replication-0]
[js_test:wildcard_index_feature_compatability_version] 2018-10-08T07:58:48.546+0000 d20271|
[js_test:wildcard_index_feature_compatability_version] 2018-10-08T07:58:48.546+0000 d20271| ***aborting after fassert() failure
[js_test:wildcard_index_feature_compatability_version] 2018-10-08T07:58:48.546+0000 d20271|
[js_test:wildcard_index_feature_compatability_version] 2018-10-08T07:58:48.546+0000 d20271|

I think we can just fix this by adding a call to awaitReplication() before stopping the set.



 Comments   
Comment by Githook User [ 22/Oct/18 ]

Author:

{'name': 'Ian Boros', 'email': 'ian.boros@10gen.com'}

Message: SERVER-37573 make wildcard_index_feature_compatibility_version.js more robust
Branch: master
https://github.com/mongodb/mongo/commit/10ec78a0ea0adca815df5a5cb9f3bf9f7d2221f6

Comment by Ian Boros [ 22/Oct/18 ]

https://github.com/mongodb/mongo/commit/10ec78a0ea0adca815df5a5cb9f3bf9f7d2221f6

Generated at Thu Feb 08 04:46:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.