Commit Graph

20 Commits

Author SHA1 Message Date
Steve McClure 1ffbc6c2e9 SERVER-109432: Autofix JS var usage to favor let (#40637)
GitOrigin-RevId: 9674b7db36a0f3f650d39c1e3fb2ad6ff2141cfb
2025-08-28 19:21:01 +00:00
Zac 591928c619 SERVER-108478 JS formatted by prettier and remove clang-format (#39656)
GitOrigin-RevId: 6c8f6aded47f260aa4f7c231b17dae3302cb1e04
2025-08-21 17:27:09 +00:00
Xuerui Fa dcb39bdab5 SERVER-107203: Modify interrupted_batch_insert.js to expect internalI… (#38248)
GitOrigin-RevId: c4bc5fc13e199631a7d485d0a6689b0a5bfad994
2025-07-09 22:11:26 +00:00
Moustafa Maher 2fd5f78d5a SERVER-95421 make initiateWithHighElectionTimeout the default in ReplSetTest (#28174)
GitOrigin-RevId: df168ee363c3f0e86526270437d3688ac4bb326d
2024-10-22 02:53:25 +00:00
auto-revert-app[bot] ac66db99e1 Revert "SERVER-95421 make initiateWithHighElectionTimeout the default in ReplSetTest (#27947)" (#28132)
GitOrigin-RevId: de1b147732fb34b89450da992fe559b24d32f1e2
2024-10-16 09:01:25 +00:00
Moustafa Maher ba308e1391 SERVER-95421 make initiateWithHighElectionTimeout the default in ReplSetTest (#27947)
GitOrigin-RevId: f73cbfbbdc6a2c557bed145cdb429c3a8d8b3447
2024-10-15 13:24:11 +00:00
Matt Broadstone 771dabd098 SERVER-81339 Convert ReplSetTest and ShardingTest to modules (#26332)
GitOrigin-RevId: 744aa110a53786b23c62ff53f87a1418b5991e8d
2024-08-20 22:00:49 +00:00
Matt Broadstone a4f458fe4d SERVER-79735 Convert jstest corpus to use es modules 2023-08-06 20:48:04 +00:00
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