diff options
author | Luke Pearson <luke.pearson@mongodb.com> | 2020-09-30 14:05:56 +1000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-09-30 04:25:36 +0000 |
commit | 11eff2c56f44404d3d1ad4c26449507610a0a7e5 (patch) | |
tree | 7491b89406a371cf604c9cb927b527657f3e257f | |
parent | 2c81f4579bbe0465acbd3ba1fe34adc5ec2033a4 (diff) | |
download | mongo-11eff2c56f44404d3d1ad4c26449507610a0a7e5.tar.gz |
SERVER-43457 Removing truncate workaround and related TODO
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp index d6338be1b1d..3439a78a406 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp @@ -1295,18 +1295,12 @@ int64_t WiredTigerRecordStore::_cappedDeleteAsNeeded_inlock(OperationContext* op ret = session->truncate(session, nullptr, truncateStart, truncateEnd, nullptr); } - if (ret == ENOENT || ret == WT_NOTFOUND) { - // TODO we should remove this case once SERVER-17141 is resolved - LOGV2(22397, "Soft failure truncating capped collection. Will try again later."); - docsRemoved = 0; - } else { - invariantWTOK(ret); - _changeNumRecords(opCtx, -docsRemoved); - _increaseDataSize(opCtx, -sizeSaved); - wuow.commit(); - // Save the key for the next round - _cappedFirstRecord = firstRemainingId; - } + invariantWTOK(ret); + _changeNumRecords(opCtx, -docsRemoved); + _increaseDataSize(opCtx, -sizeSaved); + wuow.commit(); + // Save the key for the next round + _cappedFirstRecord = firstRemainingId; } } catch (const WriteConflictException&) { opCtx->releaseRecoveryUnit(); |