2018-03-27 14:30:46 -04:00
|
|
|
"""Test hook for verifying members of a replica set have matching oplogs."""
|
2017-06-14 20:44:52 -04:00
|
|
|
|
|
|
|
|
import os.path
|
|
|
|
|
|
2020-06-17 17:41:54 +03:00
|
|
|
from buildscripts.resmokelib.testing.hooks import jsfile
|
2017-06-14 20:44:52 -04:00
|
|
|
|
|
|
|
|
|
2022-09-02 21:56:05 +00:00
|
|
|
class CheckReplOplogs(jsfile.PerClusterDataConsistencyHook):
|
2018-03-27 14:30:46 -04:00
|
|
|
"""Check that local.oplog.rs matches on the primary and secondaries."""
|
2018-03-26 11:25:04 -04:00
|
|
|
|
2021-07-29 12:53:14 -04:00
|
|
|
IS_BACKGROUND = False
|
|
|
|
|
|
2025-02-06 08:51:47 -08:00
|
|
|
def __init__(self, hook_logger, fixture, shell_options=None):
|
2018-03-27 14:30:46 -04:00
|
|
|
"""Initialize CheckReplOplogs."""
|
2017-06-14 20:44:52 -04:00
|
|
|
description = "Check oplogs of all replica set members"
|
|
|
|
|
js_filename = os.path.join("jstests", "hooks", "run_check_repl_oplogs.js")
|
2025-02-06 08:51:47 -08:00
|
|
|
jsfile.JSHook.__init__(
|
2024-05-16 18:00:17 -04:00
|
|
|
self, hook_logger, fixture, js_filename, description, shell_options=shell_options
|
|
|
|
|
)
|