Skip to content

Commit eb10ad2

Browse files
daisykucharskiMongoDB Bot
authored andcommitted
SERVER-91978 fix checkIdIndexExists use of getAllIndexes (#25554)
GitOrigin-RevId: 45005f3
1 parent e7a2ba4 commit eb10ad2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/mongo/db/startup_recovery.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,7 @@ Status restoreMissingFeatureCompatibilityVersionDocument(
207207
* the _id field
208208
*/
209209
bool checkIdIndexExists(OperationContext* opCtx, const Collection* coll) {
210-
auto indexCount = coll->getTotalIndexCount();
211-
auto indexNames = std::vector<std::string>(indexCount);
210+
auto indexNames = std::vector<std::string>();
212211
coll->getAllIndexes(&indexNames);
213212

214213
for (const auto& name : indexNames) {

0 commit comments

Comments
 (0)