[SERVER-76139] sync_source_changes.js should wait for node to no longer be newly added before asserting on selected sync source Created: 14/Apr/23  Updated: 29/Oct/23  Resolved: 18/Apr/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 7.0.0-rc0, 6.0.5, 5.0.16
Fix Version/s: 7.1.0-rc0, 6.0.6, 5.0.18, 7.0.0-rc1

Type: Engineering Test Priority: Major - P3
Reporter: Kaitlin Mahar Assignee: Kaitlin Mahar
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Backport Requested:
v7.0, v6.0, v5.0
Sprint: Repl 2023-04-17, Repl 2023-05-01
Participants:
Linked BF Score: 0

 Description   

This test makes an assertion which relies on the fact that a voting node will prefer to select another voting node as a sync source when possible. However, a node marked newlyAdded is considered non-voting, and so this test can fail if a node is still marked newlyAdded at the time we try to assert that it prefers a voting node.

 



 Comments   
Comment by Githook User [ 24/Apr/23 ]

Author:

{'name': 'Kaitlin Mahar', 'email': 'kaitlin.mahar@mongodb.com', 'username': 'kmahar'}

Message: SERVER-76139 sync_source_changes.js should wait for node to no longer be newly added before asserting on sync source

(cherry picked from commit 983d4ca5e0c50d644c64be42bd59df481dee0a57)
Branch: v7.0
https://github.com/mongodb/mongo/commit/5a5c5dae96e52c84fa8cb7a7780afa735f540561

Comment by Githook User [ 21/Apr/23 ]

Author:

{'name': 'Kaitlin Mahar', 'email': 'kaitlin.mahar@mongodb.com', 'username': 'kmahar'}

Message: SERVER-76139 sync_source_changes.js should wait for node to no longer be newly added before asserting on sync source

(cherry picked from commit 983d4ca5e0c50d644c64be42bd59df481dee0a57)
Branch: v5.0
https://github.com/mongodb/mongo/commit/dab5256c29144f0f61757d8cf470dc6aca748419

Comment by Githook User [ 21/Apr/23 ]

Author:

{'name': 'Kaitlin Mahar', 'email': 'kaitlin.mahar@mongodb.com', 'username': 'kmahar'}

Message: SERVER-76139 sync_source_changes.js should wait for node to no longer be newly added before asserting on sync source

(cherry picked from commit 983d4ca5e0c50d644c64be42bd59df481dee0a57)
Branch: v6.0
https://github.com/mongodb/mongo/commit/c75519b4857061ff55da681b104239c79aaa5f28

Comment by Githook User [ 18/Apr/23 ]

Author:

{'name': 'Kaitlin Mahar', 'email': 'kaitlin.mahar@mongodb.com', 'username': 'kmahar'}

Message: SERVER-76139 sync_source_changes.js should wait for node to no longer be newly added before asserting on sync source
Branch: master
https://github.com/mongodb/mongo/commit/983d4ca5e0c50d644c64be42bd59df481dee0a57

Comment by Kaitlin Mahar [ 14/Apr/23 ]

I noticed that the comment on ReplSetTest.awaitSecondaries is inaccurate as to what the default behavior of that method is re: waiting for newly added removals. This is likely why we missed waiting for newly added removals in the original fix for this failure in SERVER-68338. The comment states that it waits by default but in fact the opposite is true. I think this likely happened because when the option was first added, SERVER-57214, it did initially wait by default, but it looks like following some BFs we reverted the ticket and later recommitted with the default flipped.
I will update the comment on that method as part of doing this ticket to clarify.

Generated at Thu Feb 08 06:31:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.