diff options
Diffstat (limited to 'src/mongo/dbtests/rollbacktests.cpp')
-rw-r--r-- | src/mongo/dbtests/rollbacktests.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mongo/dbtests/rollbacktests.cpp b/src/mongo/dbtests/rollbacktests.cpp index 10586a30ee7..75ce5b01d6e 100644 --- a/src/mongo/dbtests/rollbacktests.cpp +++ b/src/mongo/dbtests/rollbacktests.cpp @@ -126,14 +126,11 @@ size_t getNumIndexEntries(OperationContext* opCtx, auto desc = catalog->findIndexByName(opCtx, idxName, false); if (desc) { - auto cursor = catalog->getEntry(desc)->accessMethod()->newCursor(opCtx); - KeyString::Builder keyString( - catalog->getEntry(desc) - ->accessMethod() - ->getSortedDataInterface() - ->getKeyStringVersion(), - BSONObj(), - catalog->getEntry(desc)->accessMethod()->getSortedDataInterface()->getOrdering()); + auto iam = catalog->getEntry(desc)->accessMethod()->asSortedData(); + auto cursor = iam->newCursor(opCtx); + KeyString::Builder keyString(iam->getSortedDataInterface()->getKeyStringVersion(), + BSONObj(), + iam->getSortedDataInterface()->getOrdering()); for (auto kv = cursor->seek(keyString.getValueCopy()); kv; kv = cursor->next()) { numEntries++; } |