Skip to content

Commit 6cbaa17

Browse files
pierlauroMongoDB Bot
authored andcommitted
SERVER-104222 Look at latest state of unexpected collections (#35924)
GitOrigin-RevId: 754c8e062d9a1acb5c3093ecda1966953ae88d29
1 parent 631c843 commit 6cbaa17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mongo/db/s/metadata_consistency_util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ MONGO_FAIL_POINT_DEFINE(simulateCatalogTopLevelMetadataInconsistency);
100100
long long getNumDocs(OperationContext* opCtx, const Collection* localColl) {
101101
// Since users are advised to delete empty misplaced collections, rely on isEmpty
102102
// that is safe because the implementation guards against SERVER-24266.
103-
if (AutoGetCollection ac(opCtx, localColl->ns(), MODE_IS); localColl->isEmpty(opCtx)) {
103+
if (AutoGetCollection ac(opCtx, localColl->ns(), MODE_IS); ac->isEmpty(opCtx)) {
104104
return 0;
105105
}
106106
DBDirectClient client(opCtx);

0 commit comments

Comments
 (0)