milvus/internal/datanode/metacache
congqixia eaabe0293b
fix: Update segment compactTo when compactTo segment is compacted (#28755)
Related to #28736 #28748
See also #27675
Previous PR: #28646

This PR fixes `SegmentNotFound` issue when compaction happens multiple
times and the buffer of first generation segment is sync due to stale
policy

Now the `CompactSegments` API of metacache shall update the compactTo
field of segmentInfo if the compactTo segment is also compacted to keep
the bloodline clean

Also, add the `CompactedSegment` SyncPolicy to sync the compacted
segment asap to keep metacache clean

Now the `SyncPolicy` is an interface instead of a function type so that
when it selects some segments to sync, we colud log the reason and
target segment

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2023-11-27 19:48:26 +08:00
..
actions_test.go Add WriteBuffer to provide abstraction for delta policy (#27874) 2023-11-04 12:10:17 +08:00
actions.go enhance: Add back clean compacted segment info logic (#28646) 2023-11-24 15:38:25 +08:00
bloom_filter_set_test.go Add SyncManager to replace flush manager (#27873) 2023-10-31 02:30:16 +08:00
bloom_filter_set.go Use writebuffer, sync manager refactory in datanode (#28320) 2023-11-15 15:24:18 +08:00
meta_cache_test.go enhance: Add back clean compacted segment info logic (#28646) 2023-11-24 15:38:25 +08:00
meta_cache.go fix: Update segment compactTo when compactTo segment is compacted (#28755) 2023-11-27 19:48:26 +08:00
mock_meta_cache.go enhance: Add back clean compacted segment info logic (#28646) 2023-11-24 15:38:25 +08:00
segment_test.go Add SyncManager to replace flush manager (#27873) 2023-10-31 02:30:16 +08:00
segment.go enhance: Add back clean compacted segment info logic (#28646) 2023-11-24 15:38:25 +08:00
storagev2_cache_test.go feat: integrate storage v2 into the write path (#28440) 2023-11-23 17:26:24 +08:00
storagev2_cache.go feat: integrate storage v2 into the write path (#28440) 2023-11-23 17:26:24 +08:00