diff options
author | Misha Ivkov <misha.ivkov@10gen.com> | 2019-07-11 15:32:15 -0400 |
---|---|---|
committer | Misha Ivkov <misha.ivkov@10gen.com> | 2019-07-11 15:32:15 -0400 |
commit | 95d6412f4d1d150e3027048b27eca07c5dec27be (patch) | |
tree | cd8302c14644bff2cb5a89976e2071d280f6f74f /src | |
parent | 1719255a297343227cd9a190a3280fb8fef2c488 (diff) | |
download | mongo-95d6412f4d1d150e3027048b27eca07c5dec27be.tar.gz |
Revert "SERVER-40620 fassert during document fetch when there is evidence of index corruption"
This reverts commit cf6ffa0d0b72574bf6fee66a46e1b264c0cc6d63.
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/catalog/index_catalog_impl.cpp | 7 | ||||
-rw-r--r-- | src/mongo/db/exec/working_set_common.cpp | 30 | ||||
-rw-r--r-- | src/mongo/dbtests/query_stage_merge_sort.cpp | 2 |
3 files changed, 0 insertions, 39 deletions
diff --git a/src/mongo/db/catalog/index_catalog_impl.cpp b/src/mongo/db/catalog/index_catalog_impl.cpp index 9700b125b5f..a0a467bccc2 100644 --- a/src/mongo/db/catalog/index_catalog_impl.cpp +++ b/src/mongo/db/catalog/index_catalog_impl.cpp @@ -75,8 +75,6 @@ namespace mongo { -MONGO_FAIL_POINT_DEFINE(skipUnindexingDocumentWhenDeleted); - using std::endl; using std::string; using std::unique_ptr; @@ -1465,11 +1463,6 @@ void IndexCatalogImpl::_unindexRecord(OperationContext* opCtx, entry->accessMethod()->getKeys( obj, IndexAccessMethod::GetKeysMode::kRelaxConstraintsUnfiltered, &keys, nullptr, nullptr); - // Tests can enable this failpoint to produce index corruption scenarios where an index has - // extra keys. - MONGO_FAIL_POINT_BLOCK(skipUnindexingDocumentWhenDeleted, extraData) { - return; - } _unindexKeys(opCtx, entry, {keys.begin(), keys.end()}, obj, loc, logIfError, keysDeletedOut); } diff --git a/src/mongo/db/exec/working_set_common.cpp b/src/mongo/db/exec/working_set_common.cpp index d41e21d2fb2..c3d65fa448b 100644 --- a/src/mongo/db/exec/working_set_common.cpp +++ b/src/mongo/db/exec/working_set_common.cpp @@ -27,8 +27,6 @@ * it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kQuery - #include "mongo/platform/basic.h" #include "mongo/db/exec/working_set_common.h" @@ -39,27 +37,9 @@ #include "mongo/db/index/index_access_method.h" #include "mongo/db/query/canonical_query.h" #include "mongo/db/service_context.h" -#include "mongo/util/log.h" namespace mongo { -namespace { -std::string indexKeyVectorDebugString(const std::vector<IndexKeyDatum>& keyData) { - StringBuilder sb; - sb << "["; - if (keyData.size() > 0) { - auto it = keyData.begin(); - sb << "(key: " << it->keyData << ", index key pattern: " << it->indexKeyPattern << ")"; - while (++it != keyData.end()) { - sb << ", (key: " << it->keyData << ", index key pattern: " << it->indexKeyPattern - << ")"; - } - } - sb << "]"; - return sb.str(); -} -} // namespace - void WorkingSetCommon::prepareForSnapshotChange(WorkingSet* workingSet) { for (auto id : workingSet->getAndClearYieldSensitiveIds()) { if (workingSet->isFree(id)) { @@ -88,16 +68,6 @@ bool WorkingSetCommon::fetch(OperationContext* opCtx, member->obj.reset(); auto record = cursor->seekExact(member->recordId); if (!record) { - // During a query yield, if the member is in the RID_AND_IDX state it should have been - // marked as suspicious. If not, then we failed to find the keyed document within the same - // storage snapshot, and therefore there may be index corruption. - if (member->getState() == WorkingSetMember::RID_AND_IDX && !member->isSuspicious) { - error() << "Evidence of index corruption due to extraneous index key(s): " - << indexKeyVectorDebugString(member->keyData) << " on document with record id " - << member->recordId - << ", see http://dochub.mongodb.org/core/data-recovery for recovery steps."; - fassertFailed(31138); - } return false; } diff --git a/src/mongo/dbtests/query_stage_merge_sort.cpp b/src/mongo/dbtests/query_stage_merge_sort.cpp index bdc9f235bfb..5656174f7b3 100644 --- a/src/mongo/dbtests/query_stage_merge_sort.cpp +++ b/src/mongo/dbtests/query_stage_merge_sort.cpp @@ -576,8 +576,6 @@ public: ++it; } - WorkingSetCommon::prepareForSnapshotChange(&ws); - // Delete recordIds[11]. The deleted document should be buffered inside the SORT_MERGE // stage, and therefore should still be returned. ms->saveState(); |