[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: |
|
||||||||||||||||
| 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: |
| Comment by Githook User [ 31/Jul/20 ] |
|
Author: {'name': 'Bynn Lee', 'email': 'bynn.lee@mongodb.com', 'username': 'bynn'}Message: Revert " This reverts commit 70a223895e7d3ffd182d93518e58ec2961c6895f. |
| Comment by Githook User [ 31/Jul/20 ] |
|
Author: {'name': 'Bynn Lee', 'email': 'bynn.lee@mongodb.com', 'username': 'bynn'}Message: |