Skip to content

TOOLS-4263 Convert mongorestore replica-set oplog-replay tests to Go#1049

Draft
autarch wants to merge 1 commit into
07-17-tools-4263_convert_mongorestore_oplog-replay_edge-case_tests_to_gofrom
07-23-tools-4263_convert_mongorestore_replica-set_oplog-replay_tests_to_go
Draft

TOOLS-4263 Convert mongorestore replica-set oplog-replay tests to Go#1049
autarch wants to merge 1 commit into
07-17-tools-4263_convert_mongorestore_oplog-replay_edge-case_tests_to_gofrom
07-23-tools-4263_convert_mongorestore_replica-set_oplog-replay_tests_to_go

Conversation

@autarch

@autarch autarch commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

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 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator Author

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
autarch force-pushed the 07-17-tools-4263_convert_mongorestore_oplog-replay_edge-case_tests_to_go branch from 6e72aea to 60200d1 Compare July 23, 2026 18:19
@autarch
autarch force-pushed the 07-23-tools-4263_convert_mongorestore_replica-set_oplog-replay_tests_to_go branch from f43b301 to e8077fc Compare July 23, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant