diff --git a/jstests/noPassthrough/timeseries/validate/validate_timeseries_version.js b/jstests/noPassthrough/timeseries/validate/validate_timeseries_version.js index 3dea4fc126e..3b87adff487 100644 --- a/jstests/noPassthrough/timeseries/validate/validate_timeseries_version.js +++ b/jstests/noPassthrough/timeseries/validate/validate_timeseries_version.js @@ -145,7 +145,7 @@ getTimeseriesCollForRawOps(db, coll).updateOne( res = coll.validate(); assert(!res.valid, tojson(res)); 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 // will error in testing, instead of being warnings. In this case, diff --git a/src/mongo/db/validate/validate_adaptor.cpp b/src/mongo/db/validate/validate_adaptor.cpp index aad0699edbe..12484e3af12 100644 --- a/src/mongo/db/validate/validate_adaptor.cpp +++ b/src/mongo/db/validate/validate_adaptor.cpp @@ -110,9 +110,6 @@ const long long kInterruptIntervalNumBytes = 50 * 1024 * 1024; // 50MB. static constexpr const char* kSchemaValidationFailedReason = "Detected one or more documents not compliant with the collection's schema. Check logs for log " "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 = "Detected one or more documents in this collection not conformant to BSON specifications. For " "more info, see logs with log id 6825900"; @@ -1137,7 +1134,7 @@ void ValidateAdaptor::traverseRecordStore(OperationContext* opCtx, "recordId"_attr = record->id, "reason"_attr = bucketStatus); nNonCompliantDocuments++; - results->addError(kTimeseriesValidationInconsistencyReason); + results->addError(bucketStatus.reason()); } auto containsMixedSchemaDataResponse = coll->doesTimeseriesBucketsDocContainMixedSchemaData(recordBson);