Operational Defect Database

BugZero found this defect 27 days ago.

MongoDB | 2649711

CurOp index build collection scan message inconsistent with listIndexes build info

Last update date:

4/22/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Info

The index build process updates both the currentOp message and the listIndexes results to reflect the current phase of the index build. For the collection scan phase, the gap between updating the currentOp message and setting the phase for listIndexes (and resumable index builds) may be noticeable enough on slow machines for the two command results to be inconsistent with each other. We have observed occasional failures in our CI system as a result of this issue in the test list_indexes_index_build_info.js, where the test helper IndexBuildTest.waitForIndexBuildToScanCollection() infers the collection scan state from the initialization of the progress meter in the currentOp output. Besides listIndexes, the index build phase is used to support[ resuming index builds|https://www.mongodb.com/docs/manual/core/index-creation/#monitor-in-progress-index-builds] that have been interrupted by server shutdown. We save the information in MultiIndexBlock::_constructStateObject() and parse it on startup in StorageEngineImpl::_handleInternalIdent(). The handling of the resumable index build info should be a consideration in any potential solution. We should also revisit IndexBuildTest.waitForIndexBuildToScanCollection() to see if it can be made more robust by checking the listIndexes output before getting the operation ID.

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Open

Learn More

Search:

...