Operational Defect Database

BugZero found this defect 16 days ago.

MongoDB | 2661696

Find command may save plans that are holding locks on error

Last update date:

5/3/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

8.0 Required

Description:

Info

As part of SERVER-84574 we made it so that endQueryOp may now throw an exception since it tries to acquire the global lock. This however has introduced an error scenario that couldn't happen before: The command starts executing the find command and successfully builds a batch. The command then proceeds to create a getMore cursor and enters this block. The block then creates a new cursor and puts the PlanExecutor in there. endQueryOp throws an error due to the interruption of the opCtx. This causes us to never release the locks as that happens in the line below. In this scenario we would end up with a cursor that has a PlanExecutor with live locks taken.

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

In Code Review

Learn More

Search:

...