summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl
diff options
context:
space:
mode:
authorJordi Olivares Provencio <jordi.olivares-provencio@mongodb.com>2023-04-28 13:36:44 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-04-28 15:11:07 +0000
commit8c64458511a257877e99a2e78278db1ea3bd14b8 (patch)
tree3921deffc14da93fe4ed0d2730ced2ebe82e9aaa /src/mongo/db/repl
parentab15cb29a43ea6a3b76c6fa9764dc4839558f85c (diff)
downloadmongo-8c64458511a257877e99a2e78278db1ea3bd14b8.tar.gz
SERVER-75440 Add new consistency check for preimages
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r--src/mongo/db/repl/dbcheck.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mongo/db/repl/dbcheck.cpp b/src/mongo/db/repl/dbcheck.cpp
index 24c008a2df2..db0575cd072 100644
--- a/src/mongo/db/repl/dbcheck.cpp
+++ b/src/mongo/db/repl/dbcheck.cpp
@@ -203,10 +203,14 @@ std::unique_ptr<HealthLogEntry> dbCheckBatchEntry(
if (hashesMatch) {
return SeverityEnum::Info;
}
- // Implicitly replicated collections and capped collections not replicating truncation are
- // not designed to be consistent, so inconsistency is not necessarily pathological.
+ // We relax inconsistency checks for some collections to a simple warning in some cases.
+ // preimages and change collections may be using untimestamped truncates on each node
+ // independently and can easily be inconsistent. In addition, by design
+ // the image_collection can skip a write during steady-state replication, and the preimages
+ // collection can be inconsistent during logical initial sync, all of which is
+ // harmless.
if (nss.isChangeStreamPreImagesCollection() || nss.isConfigImagesCollection() ||
- (options && options->capped)) {
+ nss.isChangeCollection() || (options && options->capped)) {
return SeverityEnum::Warning;
}