mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
cdc7af4c6d
... and simplify ReplCoordTestFixture ReplicationCoordinatorImpl consults the storage engine's isDurable flag for two purposes: 1. To choose whether to present the durable or applied optime when standing for election in pv1 2. To decide how to interpret w:majority without an explicit j field when waiting for write concern. In the first case, it is unnecessary to choose which optime to apply based on the isDurable flag. It is always safe and correct to present the applied optime, because if the node presenting it wins election, it will attempt to commit that applied optime. That means that voters may safely vote for that node. In the second case, using the value of the local node's storage engine's isDurable flag to adjust the meaning of w:majority is out of spec. Whether w:majority writes wait for journaling is a function only of the writeConcernMajorityJournalDefault flag when a write concern omits the "j" field. This patch removes the unnecessary consultation of the isDurable flag, and uses the opportunity to simplify the constructor of ReplicationCoordinatorImpl and its test fixture. |
||
---|---|---|
.. | ||
aggregation | ||
auth | ||
concurrency | ||
core | ||
decimal | ||
disk | ||
dur | ||
fail_point | ||
gle | ||
hooks | ||
httpinterface | ||
libs | ||
mmap_v1 | ||
multiVersion | ||
noPassthrough | ||
noPassthroughWithMongod | ||
parallel | ||
perf | ||
readonly | ||
repl | ||
replsets | ||
serial_run | ||
sharding | ||
slow1 | ||
ssl | ||
sslSpecial | ||
tool |