[SERVER-58311] MongoDB calls WT RTS API while holding an open cursor on _mdb_catalog Created: 07/Jul/21 Updated: 29/Oct/23 Resolved: 01/Oct/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.1.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Haribabu Kommi | Assignee: | Josef Ahmad |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | techdebt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Sprint: | Execution Team 2021-10-04 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
WT wants to enforce that RTS take exclusive access on a table to remove any unstable updates to avoid producing inconsistent results with a cursor operation that operates in parallel to it. With that enforcement, we get the following failure from some of the MDB tests.
This ticket is to find out to close all open cursors before calling WT RTS API? |
| Comments |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 01/Oct/21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Josef Ahmad', 'email': 'josef.ahmad@mongodb.com', 'username': 'josefahmad'}Message: WiredTiger Rollback To Stable (RTS) requires exclusive access to all | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Josef Ahmad [ 30/Sep/21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There turned out to be three areas of contention.
Note that these three bullet points are not necessarily an exhaustive list. Once we resolve the three bullet points we'll get a better signal to spot any possible additional contention points down the line. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Haribabu Kommi [ 08/Jul/21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
daniel.gottlieb Thanks for the quick patch. That solved the _mdb_catalog file problem, but still MDB holds a couple of cursors when RTS is called. Following is the new error message that I got with the new patch build.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Gottlieb (Inactive) [ 07/Jul/21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
haribabu.kommi, I haven't tested this, but I'm curious if it fixes your problem:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Gottlieb (Inactive) [ 07/Jul/21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The WT_SESSION calling RTS (thankfully) seems to be the culprit:
I suspect there's no actual bug as this session/cursor can't be doing anything other than calling RTS. haribabu.kommi, I'll see if I can provide a quick patch that you can run to at least verify there's nothing more nefarious going on. |