summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/validate_state.cpp
diff options
context:
space:
mode:
authorSviatlana Zuiko <sviatlana.zuiko@mongodb.com>2022-06-30 18:11:13 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-06-30 20:06:51 +0000
commit831c5c4617312f901dfa3d70838a591365e12825 (patch)
treea3bde1b1bd91f8a3b0732e38c3f5fac7c013c9c8 /src/mongo/db/catalog/validate_state.cpp
parentb6f28cafe782fcaa03320d8b9660510ba2fbc892 (diff)
downloadmongo-831c5c4617312f901dfa3d70838a591365e12825.tar.gz
Revert "SERVER-66976 Enabled validation for time-series collections"
This reverts commit 37d3534f0d6212cf3e89785152a1fdaa180cceeb.
Diffstat (limited to 'src/mongo/db/catalog/validate_state.cpp')
-rw-r--r--src/mongo/db/catalog/validate_state.cpp22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/mongo/db/catalog/validate_state.cpp b/src/mongo/db/catalog/validate_state.cpp
index 12dfea9909d..09c8ec34ba3 100644
--- a/src/mongo/db/catalog/validate_state.cpp
+++ b/src/mongo/db/catalog/validate_state.cpp
@@ -40,8 +40,6 @@
#include "mongo/db/db_raii.h"
#include "mongo/db/index/index_access_method.h"
#include "mongo/db/operation_context.h"
-#include "mongo/db/server_options.h"
-#include "mongo/db/storage/storage_parameters_gen.h"
#include "mongo/logv2/log.h"
#include "mongo/util/fail_point.h"
@@ -84,22 +82,12 @@ ValidateState::ValidateState(OperationContext* opCtx,
_collection = CollectionCatalog::get(opCtx)->lookupCollectionByNamespace(opCtx, _nss);
if (!_collection) {
- if (!CollectionCatalog::get(opCtx)->lookupView(opCtx, _nss)) {
- uasserted(ErrorCodes::NamespaceNotFound,
- str::stream() << "Collection '" << _nss << "' does not exist to validate.");
- } else {
- // Uses the bucket collection in place of the time-series collection view.
- if (feature_flags::gExtendValidateCommand.isEnabled(
- serverGlobalParams.featureCompatibility)) {
- auto bucketNss = _nss.makeTimeseriesBucketsNamespace();
- _collection =
- CollectionCatalog::get(opCtx)->lookupCollectionByNamespace(opCtx, bucketNss);
- }
-
- if (!(_collection && _collection->getTimeseriesOptions())) {
- uasserted(ErrorCodes::CommandNotSupportedOnView, "Cannot validate a view");
- }
+ if (CollectionCatalog::get(opCtx)->lookupView(opCtx, _nss)) {
+ uasserted(ErrorCodes::CommandNotSupportedOnView, "Cannot validate a view");
}
+
+ uasserted(ErrorCodes::NamespaceNotFound,
+ str::stream() << "Collection '" << _nss << "' does not exist to validate.");
}
// RepairMode is incompatible with the ValidateModes kBackground and