[SERVER-85167] Size storer can be flushed concurrently with being destructed for rollback Created: 12/Jan/24  Updated: 31/Jan/24  Resolved: 30/Jan/24

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.6, 5.0.25, 6.0.14, 8.0.0-rc0, 7.3.0-rc2

Type: Bug Priority: Major - P3
Reporter: Gregory Noma Assignee: Wei Hu
Resolution: Fixed Votes: 0
Labels: bkp
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Assigned Teams:
Storage Execution
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.3, v7.0, v6.0, v5.0
Sprint: Execution Team 2024-02-05
Participants:
Linked BF Score: 120

 Description   

The size storer gets flushed when a session is released to the session cache, which happens when a session object is destructed. The operation context owns a recovery unit which in turn owns a session, so operation context destruction can trigger a size storer flush. Further, certain threads like the FTDC collector construct and destruct an operation context when they run. However, when rolling back to the stable timestamp, the size storer gets replaced with a new one. Typically this is fine since RTS holds the global exclusive lock, but in this operation context destruction case there are no locks being held. Thus we can end up with the size storer being flushed (by the operation context destruction) concurrently with it being destructed (by RTS replacing it with a new size storer).



 Comments   
Comment by Githook User [ 31/Jan/24 ]

Author:

{'name': 'Wei Hu', 'email': 'wei.hu@mongodb.com', 'username': 'wh5a'}

Message: SERVER-85167 Shut down WiredTigerSessionCache before rollback (#18443)

GitOrigin-RevId: b16e82ac6d5eeddeaa44a77215ccc412ffc3fbbd
Branch: v6.0
https://github.com/mongodb/mongo/commit/db50ef61bfbcb1eae1d7f9687a517b1f029f2bc4

Comment by Githook User [ 30/Jan/24 ]

Author:

{'name': 'Wei Hu', 'email': 'wei.hu@mongodb.com', 'username': 'wh5a'}

Message: SERVER-85167 Shut down WiredTigerSessionCache before rollback (#18443)

GitOrigin-RevId: 09f92e421a1f13ce64798b83246f1151e347bf18
Branch: v7.0
https://github.com/mongodb/mongo/commit/e121e6ef6573a65ef400c20bf2d5743e562d666f

Comment by Githook User [ 30/Jan/24 ]

Author:

{'name': 'Wei Hu', 'email': 'wei.hu@mongodb.com', 'username': 'wh5a'}

Message: SERVER-85167 Shut down WiredTigerSessionCache before rollback (#18443)

GitOrigin-RevId: 9ef6da3fdebb6efa7ea3bea82e436b41a16b4385
Branch: v5.0
https://github.com/mongodb/mongo/commit/eb8ad7edb470ef474ab682aa4d63876dad0497ca

Comment by Githook User [ 30/Jan/24 ]

Author:

{'name': 'Wei Hu', 'email': 'wei.hu@mongodb.com', 'username': 'wh5a'}

Message: SERVER-85167 Shut down WiredTigerSessionCache before rollback (#18443)

GitOrigin-RevId: 17f19349b9cfc17040ac6f314880d5a70f69b792
Branch: v7.3
https://github.com/mongodb/mongo/commit/1a51ea6c578cf710621be586c9a4bc6ed907e085

Comment by Githook User [ 29/Jan/24 ]

Author:

{'name': 'Wei Hu', 'email': 'wei.hu@mongodb.com', 'username': 'wh5a'}

Message: SERVER-85167 Shut down WiredTigerSessionCache before rollback (#18443)

GitOrigin-RevId: afd40ca031889aefe4201cde26a5a4bf170fa38c
Branch: master
https://github.com/mongodb/mongo/commit/bb359547f80f777cd9b606f1cce1d1005f945f90

Generated at Thu Feb 08 06:57:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.