[SERVER-36965] Ensure setUp writes in `safe_secondary_reads_single_migration_suspend_range_deletion.js` get propagated to the shard secondary Created: 31/Aug/18  Updated: 29/Oct/23  Resolved: 12/Sep/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.6.7, 4.1.2
Fix Version/s: 3.6.10, 4.0.5, 4.1.3

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Fixed Votes: 0
Labels: neweng, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0, v3.6
Sprint: Sharding 2018-09-24
Participants:
Linked BF Score: 0

 Description   

From investigating a build failure, I concluded that it is possible that write done in safe_secondary_reads_single_migration_suspend_range_deletion.js might not have propagated to the secondary node.

Specifically, my hypothesis is that:

  1. The setUp here succeeded on a shard's primary node
  2. That write did not replicate yet to the secondary
  3. The read from aggregate went against the secondary node of the shard and did not find the document.

I have no way of proving that through the logs, but instead I want to make all setUp writes, like the one here use {w:2} write concern in order to ensure both nodes get the document before proceeding with the rest of the test.

Another more generic solution could be to call awaitReplication after the setUp call here in order to ensure all existing and future tests will wait.



 Comments   
Comment by Githook User [ 21/Nov/18 ]

Author:

{'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}

Message: SERVER-36965 Wait for replication on all 'setUp' writes performed by the safe_secondary_reads* tests

(cherry picked from commit 626567bcde38521d76834db0c59e1aee62344b69)
(cherry picked from commit 307fb959416370df29fe6e4c64b5ca44de262c2e)
Branch: v3.6
https://github.com/mongodb/mongo/commit/4b62e25620105acde57567dcd5d44ef873ff2c3e

Comment by Githook User [ 16/Nov/18 ]

Author:

{'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}

Message: SERVER-36965 Wait for replication on all 'setUp' writes performed by the safe_secondary_reads* tests

(cherry picked from commit 626567bcde38521d76834db0c59e1aee62344b69)
Branch: v4.0
https://github.com/mongodb/mongo/commit/307fb959416370df29fe6e4c64b5ca44de262c2e

Comment by Githook User [ 12/Sep/18 ]

Author:

{'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}

Message: SERVER-36965 Wait for replication on all 'setUp' writes performed by the safe_secondary_reads* tests
Branch: master
https://github.com/mongodb/mongo/commit/626567bcde38521d76834db0c59e1aee62344b69

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