[SERVER-34721] Make interrupted_batch_insert.js more robust Created: 27/Apr/18  Updated: 29/Oct/23  Resolved: 08/May/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Justin Seyster Assignee: Justin Seyster
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-05-07, Query 2018-05-21
Participants:
Linked BF Score: 7

 Description   

On backporting this test to 3.6, I discovered that it fails in pv0, because the method it was using to wait for a new primary wasn't quite right.



 Comments   
Comment by Githook User [ 08/May/18 ]

Author:

{'email': 'justin.seyster@mongodb.com', 'name': 'Justin Seyster', 'username': 'jseyster'}

Message: SERVER-34721 Make interrupted_batch_insert.js more robust

Previously, the test used awaitSyncSource to wait until it was safe to
write to a new primary, which doesn't really make sense. The more
robust way to do it is to call getPrimary().

As a bonus, stopServerReplication is a better way to ensure that
writes don't progagate to a particular secondary than simply
disconnecting that secondary from the primary.

Finally, the test now uses a checkLog to make sure the server has
arrived at the hangDuringBatchInsert fail point, rather than a one
second sleep.
Branch: master
https://github.com/mongodb/mongo/commit/a07ae84cd62cb53ccae9165e758eed8b79564101

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