summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/README.md
diff options
context:
space:
mode:
authorSamyukta Lanka <samy.lanka@mongodb.com>2019-11-05 19:32:45 +0000
committerevergreen <evergreen@mongodb.com>2019-11-05 19:32:45 +0000
commit853bdc4b34d9c3505e2af1f443ad7a99a619adea (patch)
tree47355ef2d25b508bfaa035f3962fdd9928a082ab /src/mongo/db/repl/README.md
parenteb9ba994bce0e44562e877530a29a01fc8b8da6c (diff)
downloadmongo-853bdc4b34d9c3505e2af1f443ad7a99a619adea.tar.gz
SERVER-43875 Start initial sync oplog fetching from an earlier point to fetch all oplog entries associated with active transactions
Diffstat (limited to 'src/mongo/db/repl/README.md')
-rw-r--r--src/mongo/db/repl/README.md17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/mongo/db/repl/README.md b/src/mongo/db/repl/README.md
index 5c502189f0f..9f02944e0e0 100644
--- a/src/mongo/db/repl/README.md
+++ b/src/mongo/db/repl/README.md
@@ -799,15 +799,20 @@ Before the data clone phase begins, the node will do the following:
3. Drop all of its data except for the local database and recreate the oplog.
4. Get the Rollback ID (RBID) from the sync source to ensure at the end that no rollbacks occurred
during initial sync.
-5. Query its sync source's transactions table for the oldest starting OpTime of all active
- transactions. This will be the `beginFetchingTimestamp` or the timestamp that it begins fetching
- oplog entries from, so that the node will have the oplog entries for all active transactions in
- its oplog.
-6. Query its sync source's oplog for its lastest OpTime. This will be the `beginApplyingTimestamp`,
+5. Query its sync source's oplog for its latest OpTime and save it as the
+ `defaultBeginFetchingOpTime`. If there are no open transactions on the sync source, this will be
+ used as the `beginFetchingTimestamp` or the timestamp that it begins fetching oplog entries from.
+6. Query its sync source's transactions table for the oldest starting OpTime of all active
+ transactions. If this timestamp exists (meaning there is an open transaction on the sync source)
+ this will be used as the `beginFetchingTimestamp`. If this timestamp doesn't exist, the node will
+ use the `defaultBeginFetchingOpTime` instead. This will ensure that even if a transaction was
+ started on the sync source after it was queried for the oldest active transaction timestamp, the
+ syncing node will have all the oplog entries associated with an active transaction in its oplog.
+7. Query its sync source's oplog for its lastest OpTime. This will be the `beginApplyingTimestamp`,
or the timestamp that it begins applying oplog entries at once it has completed the data clone
phase. If there was no active transaction on the sync source, the `beginFetchingTimestamp` will
be the same as the `beginApplyingTimestamp`.
-7. Create an `OplogFetcher` and start fetching and buffering oplog entries from the sync source
+8. Create an `OplogFetcher` and start fetching and buffering oplog entries from the sync source
to be applied later. Operations are buffered to a collection so that they are not limited by the
amount of memory available.