From 9725c52583a2c86daab45004f7764dfc087a2685 Mon Sep 17 00:00:00 2001 From: Congqi Xia Date: Tue, 6 Aug 2024 15:33:44 +0800 Subject: [PATCH] enhance: Purge delete buffer asap all L0 segment ready See also #35303 Signed-off-by: Congqi Xia --- internal/querynodev2/delegator/delegator_data.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/querynodev2/delegator/delegator_data.go b/internal/querynodev2/delegator/delegator_data.go index c50620fc163ef..92f5b076cb01e 100644 --- a/internal/querynodev2/delegator/delegator_data.go +++ b/internal/querynodev2/delegator/delegator_data.go @@ -668,6 +668,9 @@ func (sd *shardDelegator) loadStreamDelete(ctx context.Context, } } + // if segment level is not L0, delete buffer could be purged safely according to target checkpoint + sd.deleteBuffer.TryDiscard(position.GetTimestamp()) + deleteData = &storage.DeleteData{} // start position is dml position for segment // if this position is before deleteBuffer's safe ts, it means some delete shall be read from msgstream