Operational Defect Database

BugZero found this defect 16 days ago.

MongoDB | 2661620

dropIndex() should be idempotent.

Last update date:

5/3/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Info

Currently, calling dropIndex again with the same param after running it the first time, will result in an IndexNotFound error. To repro: assert.commandWorked(mongos.getCollection(ns).createIndex({x: 1}, {name: indexName, collation: {locale: "simple"}})); assert.commandWorked(mongos.getCollection(ns).dropIndex(indexName)); assert.commandWorked(mongos.getCollection(ns).dropIndex(indexName)); The second call to dropIndex() will fail with IndexNotFound

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Needs Scheduling

Learn More

Search:

...