[SERVER-49547] ephemeralForTest needs to keep track of the available history based on the oldest timestamp Created: 16/Jul/20  Updated: 29/Oct/23  Resolved: 03/Aug/20

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Improvement Priority: Major - P3
Reporter: Gregory Wlodarek Assignee: Bynn Lee
Resolution: Fixed Votes: 0
Labels: intern_ephemeral_for_test
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-48314 ephemeralForTest should support times... Closed
is depended on by SERVER-49553 Allow point-in-time read transactions... Closed
Related
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2020-07-27, Execution Team 2020-08-10
Participants:
Linked BF Score: 0

 Description   

We need a way to keep track of the available history which allows us to open a snapshot at a point-in-time for new storage transactions. Ideally, the best spot for this would be in the KVEngine as a sorted map keyed with a Timestamp that holds a shared_ptr to the StringStore.

Having this available history also lets us determine what the oldest timestamp should be.

As long as there are other open storage transactions with active snapshots, those snapshots must be kept in the available history map until the last storage transaction closes its snapshot and notifies the KVEngine to allow the KVEngine to clean up the available history map appropriately based on the reference count and oldest timestamp.

When a transaction closes its snapshot, it's also going to drop its shared_ptr references to any StringStores it held onto. If the snapshot that's being closed was the last reference (excluding the reference from the available history map) to any of the StringStores it held onto, then we must notify the KVEngine so that it can remove the appropriate StringStores from the available history and update the oldest timestamp appropriately.

Note: As StringStore's aren't timestamped when merged in today, we can temporarily assign each consecutive merge an incrementing timestamp to be able to avoid collisions in the available history map.

 

 



 Comments   
Comment by Githook User [ 03/Aug/20 ]

Author:

{'name': 'Bynn Lee', 'email': 'bynn.lee@mongodb.com', 'username': 'bynn'}

Message: SERVER-49547 ephemeralForTest needs to keep track of the available history for storage transactions with open snapshots
Branch: master
https://github.com/mongodb/mongo/commit/927f7ecc749db6c83b6a5d34b0397fc004f5517c

Comment by Githook User [ 31/Jul/20 ]

Author:

{'name': 'Bynn Lee', 'email': 'bynn.lee@mongodb.com', 'username': 'bynn'}

Message: Revert "SERVER-49547 ephemeralForTest needs to keep track of the available history for storage transactions with open snapshots"

This reverts commit 70a223895e7d3ffd182d93518e58ec2961c6895f.
Branch: master
https://github.com/mongodb/mongo/commit/e3fe508733bcc375f3d4de1adbe1bd6d722c0025

Comment by Githook User [ 31/Jul/20 ]

Author:

{'name': 'Bynn Lee', 'email': 'bynn.lee@mongodb.com', 'username': 'bynn'}

Message: SERVER-49547 ephemeralForTest needs to keep track of the available history for storage transactions with open snapshots
Branch: master
https://github.com/mongodb/mongo/commit/70a223895e7d3ffd182d93518e58ec2961c6895f

Generated at Thu Feb 08 05:20:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.