TOOLS-4263 Convert mongorestore replica-set oplog-replay tests to Go#1049
Draft
Conversation
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This adds a new `TestOplogReplayFromLocalOplogRS` test in `mongorestore/oplog_replset_test.go`. This ports two JS tests into one Go test. It dumps `local.oplog.rs` with a `$gt` timestamp query and replays the dump via `--oplogReplay --oplogFile ...`, verifying only the ops after the checkpoint are applied.
JS -> Go mapping:
- test/qa-tests/jstests/restore/oplog_replay_local_rs.js -> the
--oplogReplay --oplogFile replay of a dumped local/oplog.rs.bson
- test/legacy42/jstests/tool/dumprestore7.js -> the mongodump of
local.oplog.rs with a {ts:{$gt:...}} timestamp query
autarch
force-pushed
the
07-17-tools-4263_convert_mongorestore_oplog-replay_edge-case_tests_to_go
branch
from
July 23, 2026 18:19
6e72aea to
60200d1
Compare
autarch
force-pushed
the
07-23-tools-4263_convert_mongorestore_replica-set_oplog-replay_tests_to_go
branch
from
July 23, 2026 18:19
f43b301 to
e8077fc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This adds a new
TestOplogReplayFromLocalOplogRStest inmongorestore/oplog_replset_test.go. This ports two JS tests into one Go test. It dumpslocal.oplog.rswith a$gttimestamp query and replays the dump via--oplogReplay --oplogFile ..., verifying only the ops after the checkpoint are applied.JS -> Go mapping:
--oplogReplay --oplogFile replay of a dumped local/oplog.rs.bson
local.oplog.rs with a {ts:{$gt:...}} timestamp query