Commit Graph

12 Commits

Author SHA1 Message Date
Moustafa Maher
0d97b04197 SERVER-55703 Update getDefaultRWConcern 2021-04-29 23:07:54 +00:00
Gabriel Russell
e5f0892d0d SERVER-51078 no need for checkForInterrupt in waitWhileFailPointEnabled 2021-01-29 23:37:38 +00:00
Cheahuychou Mao
8fc28f0773 SERVER-39165 Add waitForFailpoint command and update other repl tests 2019-10-25 19:08:50 +00:00
James Wahlin
39c3a5d77b SERVER-42773 Replace uses of the assert.writeOK() Javascript assertion with assert.commandWorked() 2019-08-14 13:52:59 +00:00
Mathew Robinson
ef9f9b461e SERVER-41177 Remove Javascript ScopedThread class 2019-08-12 17:28:18 -04:00
clang-format-7.0.1
134a408395 SERVER-41772 Apply clang-format 7.0.1 to the codebase 2019-07-27 11:02:23 -04:00
Judah Schvimer
b205efb00f SERVER-41216 Rename InterruptedDueToStepDown error code to InterruptedDueToReplStateChange 2019-05-20 16:10:46 -04:00
Matthew Russotto
c3a72d61dc SERVER-38516 Remove “closeConnectionsOnStepdown” flag and fix tests broken by this 2019-02-12 11:07:46 -05:00
Justin Seyster
a07ae84cd6 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.
2018-05-08 16:08:14 -04:00
Justin Seyster
d9a5a30669 SERVER-27534 All writing operations must fail if the term changes.
This reapplies bc19d43f, which was reverted by ae50776b. It also adds
more test fixes.
2018-04-18 16:41:30 -04:00
Justin Seyster
ae50776bce Revert "SERVER-27534 All writing operations must fail if the term changes."
This reverts commit bc19d43fdc.
2018-04-13 20:50:56 -04:00
Justin Seyster
bc19d43fdc SERVER-27534 All writing operations must fail if the term changes.
The description of this SERVER ticket describes a nasty race that can
occur if elections happen inbetween two batches during a large
update. (The included test confirms that the race is possible.)

To fix this, we want to check the operation context for interrupts
with each batch, and we need to make sure the check happens _after_
the collection lock gets taken and before the batch
inserts/updates/deletes execute.

A recent change to locking gives us almost exactly this for free: if a
collection lock has to wait, it throws an exception when the operation
context is interrupted, ending the operation. If the lock doesn't
wait, though, there is no check.

This patch adds that check in. Acquiring a lock now always throws if
the operation context is interrupted, which closes the race window in
this bug.
2018-04-12 16:05:53 -04:00