mirror of https://github.com/mongodb/mongo
SERVER-115461 Report bucket validation error reasons for 6698300 failures (#45260)
GitOrigin-RevId: 0d7df0bf1c240aef7988b663caf89ee1d36a1954
This commit is contained in:
parent
b006f9bfed
commit
dc1f11645d
|
|
@ -145,7 +145,7 @@ getTimeseriesCollForRawOps(db, coll).updateOne(
|
||||||
res = coll.validate();
|
res = coll.validate();
|
||||||
assert(!res.valid, tojson(res));
|
assert(!res.valid, tojson(res));
|
||||||
assert.eq(res.nNonCompliantDocuments, 2);
|
assert.eq(res.nNonCompliantDocuments, 2);
|
||||||
assert.eq(res.errors.length, 1);
|
assert.eq(res.errors.length, 2);
|
||||||
|
|
||||||
// As of SERVER-86451, time-series inconsistencies detected during validation
|
// As of SERVER-86451, time-series inconsistencies detected during validation
|
||||||
// will error in testing, instead of being warnings. In this case,
|
// will error in testing, instead of being warnings. In this case,
|
||||||
|
|
|
||||||
|
|
@ -110,9 +110,6 @@ const long long kInterruptIntervalNumBytes = 50 * 1024 * 1024; // 50MB.
|
||||||
static constexpr const char* kSchemaValidationFailedReason =
|
static constexpr const char* kSchemaValidationFailedReason =
|
||||||
"Detected one or more documents not compliant with the collection's schema. Check logs for log "
|
"Detected one or more documents not compliant with the collection's schema. Check logs for log "
|
||||||
"id 5363500.";
|
"id 5363500.";
|
||||||
static constexpr const char* kTimeseriesValidationInconsistencyReason =
|
|
||||||
"Detected one or more documents in this collection incompatible with time-series "
|
|
||||||
"specifications. For more info, see logs with log id 6698300.";
|
|
||||||
static constexpr const char* kBSONValidationNonConformantReason =
|
static constexpr const char* kBSONValidationNonConformantReason =
|
||||||
"Detected one or more documents in this collection not conformant to BSON specifications. For "
|
"Detected one or more documents in this collection not conformant to BSON specifications. For "
|
||||||
"more info, see logs with log id 6825900";
|
"more info, see logs with log id 6825900";
|
||||||
|
|
@ -1137,7 +1134,7 @@ void ValidateAdaptor::traverseRecordStore(OperationContext* opCtx,
|
||||||
"recordId"_attr = record->id,
|
"recordId"_attr = record->id,
|
||||||
"reason"_attr = bucketStatus);
|
"reason"_attr = bucketStatus);
|
||||||
nNonCompliantDocuments++;
|
nNonCompliantDocuments++;
|
||||||
results->addError(kTimeseriesValidationInconsistencyReason);
|
results->addError(bucketStatus.reason());
|
||||||
}
|
}
|
||||||
auto containsMixedSchemaDataResponse =
|
auto containsMixedSchemaDataResponse =
|
||||||
coll->doesTimeseriesBucketsDocContainMixedSchemaData(recordBson);
|
coll->doesTimeseriesBucketsDocContainMixedSchemaData(recordBson);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue