[SERVER-74593] Unify RecordStore truncates Created: 03/Mar/23  Updated: 16/May/23  Resolved: 16/May/23

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

Type: Improvement Priority: Major - P3
Reporter: Jordi Olivares Provencio Assignee: Backlog - Storage Execution Team
Resolution: Won't Fix Votes: 0
Labels: techdebt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Storage Execution
Participants:

 Description   

As part of SERVER-74472 we had to add a new rangeTruncate method that is not tied to the same nuance as the normal truncate method.

In particular, the two differ in the sense that:

  • truncate clears out the oplog truncate markers, and clears the sizeStorer info
  • rangeTruncate expects the user to provide a hint for how much data it will remove and updates the sizeStorer information only

The difference is subtle, but impedes fully merging the two methods without rewriting the current callers of truncate. Additionally, the Oplog truncate markers would have to be separated from living inside WiredTigerRecordStore in order to align the two methods' behaviour.



 Comments   
Comment by Jordi Olivares Provencio [ 16/May/23 ]

With the introducion of the boundary invariant we now force the ranged truncates to specify at least one boundary. This makes them impossible to behave as a full truncate so no unification is possible.

As a result, we cannot unify the two methods, closing the ticket as Won't Fix.

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