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

@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
@autarch
autarch force-pushed the 07-17-tools-4263_convert_mongorestore_oplog-replay_edge-case_tests_to_go branch from 60200d1 to 04c98db Compare July 24, 2026 16:40
@autarch
autarch force-pushed the 07-23-tools-4263_convert_mongorestore_replica-set_oplog-replay_tests_to_go branch from e8077fc to c060980 Compare July 24, 2026 16:40
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 04c98db to 8fc1df8 Compare July 27, 2026 21:16
@autarch
autarch force-pushed the 07-23-tools-4263_convert_mongorestore_replica-set_oplog-replay_tests_to_go branch from c060980 to 6b97a36 Compare July 27, 2026 21:17
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