Sequence numbers have considerable storage footprint in TSDB, especially for OTel. We propose to rely on merges to remove them when they are no longer needed for peer recoveries and CCR. This disables OCC and changes the behavior of any feature relying on the latter, such as update- and delete-by-query.
This effort requires the following work items:
Distributed:
Storage Engine:
Sequence numbers have considerable storage footprint in TSDB, especially for OTel. We propose to rely on merges to remove them when they are no longer needed for peer recoveries and CCR. This disables OCC and changes the behavior of any feature relying on the latter, such as update- and delete-by-query.
This effort requires the following work items:
Distributed:
[ ] Implement a lightweight validation in the Engine to ensure that Index operations are overwriting an existing document.[ ] Evaluate if retention query can be executed once for both RecoverySourcePruneMergePolicy and SoftDeletesRetentionMergePolicy (see comment)[ ] Add coverage for disabling sequence numbers inTSDBSyntheticIdsITfollowing [TEST] Add coverage for disabling sequence numbers in TSDB ITs #143897 (see comment here)Storage Engine:
[ ] Consider enabling this setting randomly in tests and only disable it in tests that rely on OCC, seq nos, etc?