2018-03-27 14:30:46 -04:00
|
|
|
"""Test hook for verifying data consistency across a replica set."""
|
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
|
|
|
|
|
|
|
|
|
2021-11-02 17:21:41 +00:00
|
|
|
class CheckReplDBHash(jsfile.PerClusterDataConsistencyHook):
|
2018-03-27 14:30:46 -04:00
|
|
|
"""Check if the dbhashes match.
|
|
|
|
|
|
|
|
|
|
This includes dbhashes for all non-local databases and non-replicated system collections that
|
2017-06-14 20:44:52 -04:00
|
|
|
match 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 CheckReplDBHash."""
|
2017-06-14 20:44:52 -04:00
|
|
|
description = "Check dbhashes of all replica set or master/slave members"
|
|
|
|
|
js_filename = os.path.join("jstests", "hooks", "run_check_repl_dbhash.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
|
|
|
|
|
)
|