| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
transactions
|
|
|
|
| |
waitForReadConcern.
|
| |
|
| |
|
|
|
|
| |
writes while ignoring prepare conflicts
|
|
|
|
| |
ShardingState::shardId in makeNoopWriteIfNeeded
|
| |
|
| |
|
| |
|
|
|
|
| |
than using a whitelist
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prepare conflicts may only be safely ignored when a command can
guarantee it does not perform writes. Prepare conflicts are ignored when
the read concern is local, available, or majority and the command is
aggregate, count, distinct, find, getMore, or group. Aggregate is a
special case because it may perform writes to an output collection, but
it enables prepare conflict enforcement before doing so.
Additionally, connections from a DBDirectClient inherit the
ignore_prepare state from their parent operation.
|
|
|
|
|
|
| |
`kNoOverlap` timestamp read source
Speculative majority change streams provide "majority" read guarantees by reading from a local snapshot of data and then waiting for that data to become majority committed, instead of reading directly from a majority committed snapshot. In order to satisfy this guarantee a speculative majority read must wait for the proper timestamp to become majority committed after reading data. If the newest data it read reflects a timestamp T, then it must wait for a timestamp >= T to become majority committed. In general, waiting on replication's lastApplied timestamp is not safe, since it is possible for writes to be visible to readers even if those writes have not yet advanced the in-memory value of lastApplied. To work around this issue for speculative majority reads, we instead choose to read from an explicitly chosen timestamp in the storage engine, and then wait on that timestamp to majority commit. This gives us a more direct way to know what timestamp the data we read reflects. We utilize the `kNoOverlap` read source, which allows us to read from the min(lastApplied, all_committed), which is a convenient way to make these reads work correctly on both primaries and secondaries.
|
| |
|
|
|
|
|
|
| |
to use timestamps instead of optimes
This patch refactors the SpeculativeMajorityReadInfo class and the awaitOpTimeCommitted method to accept timestamps as input instead of optimes. When waiting for an operation to majority commit, term information, which is included in optimes, isn't necessary, since timestamps are totally ordered within a local oplog, and so are safely comparable. It is, for example, safe to determine if a local oplog entry is majority committed by checking if its timestamp is less than that node's local view of the majority commit point. This patch should not introduce any observable functional changes.
|
| |
|
| |
|
|
|
|
| |
at/afterClusterTime
|
|
|
|
| |
This reverts commit 0cdb86f3cf2bbabe448669598c32297f5ec8214f.
|
| |
|
|
|
|
|
|
| |
Remove leading comments that are just stating the filename.
Move any file-level comments below the copyright banner.
Remove leading blank lines.
|
|
|
|
| |
timeout
|
|
|
|
| |
"closeConnectionsOnStepdown" flag.
|
|
|
|
| |
This patch adds functionality for "speculative" majority reads. These are reads that can satisfy "majority" read concern guarantees without support from the storage engine for reading from a historical snapshot. Queries of this nature will, by default, wait on the most recent lastApplied optime to majority commit after they complete, but before returning to the client. They can also optionally set a custom optime T to wait on, if they know that they did not read any data that reflects the effects of operations newer than optime T.
|
|
|
|
| |
cluster time to be majority-committed
|
|
|
|
| |
replica_sets_multi_stmt_txn_jscore_passthrough suite
|
|
|
|
|
|
|
|
| |
down to before command execution.
Transaction will begin or continue after waiting for read concern. If
an error is thrown on starting transaction, it'll be able to wait for
write concern if a write concern is specified.
|
| |
|
|
|
|
| |
speculative
|
|
Read concern implementation shim'd out and separate for mongod and embedded.
|