-
Type: New Feature
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Truncate
-
Storage Engines
-
5
-
2023-03-21 Ellen Ripley, 2024-03-19 - PacificOcean, 2024-04-02 - GreatMugshot, 나비 (nabi) - 2024-04-16
WiredTiger introduced the ability to correctly execute a WT_SESSION::truncate operation with an application supplied timestamp to the standalone release of WiredTiger in WT-8447. That fix required an on-disk data format change, so for MongoDB we added support for reading the new data format, but did not yet support writing the additional information.
That restriction was in place to ensure that users could downgrade without issue from the current (6.0) version of MongoDB to an earlier version.
The scope of this ticket is to enable writing the information required to correctly support a truncate operation at a timestamp in MongoDB. That will be done by reviewing the code the is excluded via HAVE_STANDALONE_RELEASE define, which is how the functionality is restricted.
The other work required prior to completing this will be to ensure that the following works:
- Application performs a truncate at a point in time with WiredTiger that supports timestamp safe truncate.
- Artificially crash application before a new checkpoint is created.
- Startup the database using an older version that doesn't support point-in-time semantics.
It might be sensible to split that testing work into a different ticket and get it done prior to this ticket that enables the functionality for MongoDB.
It's also worth noting that if a truncate at a point in time is done, then the application is downgraded, it is not guaranteed that WiredTiger recovery will exhibit the correct behavior. The value of the additional persisted information is that it allows recovery to make the right decision about how to re-apply a truncate operation during recovery.
That should be OK for MongoDB - since recovery as-of a timestamp isn't WAL based, so shouldn't encounter a problematic scenario. There are a number of suppositions there though - which is why testing is important to increase confidence.
- causes
-
WT-13191 Revert the change to write fast truncate information to disk for MDB release
- Closed
-
WT-12869 Investigate whether we should increase the WT_MIN_STARTUP_VERSION in 8.0
- Closed
-
WT-12793 Remove 6.0 tests after removing support for downgrading database files beyond 7.0
- Closed
- depends on
-
WT-11321 Checkpoint cleanup does not free fast-truncated trees in 6.0
- Closed
-
WT-10862 Support read-only fast-truncate data format change in MongoDB 6.0 release
- Closed
- is depended on by
-
SERVER-78665 Implement replicated truncates for collections
- Backlog
- related to
-
SERVER-90848 Update old LTS version list in skip_level_upgrade.js to allow mongoDB WT to enable PIT truncate functionality.
- Closed