Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: unindexed collection can be compacted #39650

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/datacoord/compaction_policy_single.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (policy *singleCompactionPolicy) triggerOneCollection(ctx context.Context,
views := make([]CompactionView, 0)
for _, group := range partSegments {
if Params.DataCoordCfg.IndexBasedCompaction.GetAsBool() {
group.segments = FilterInIndexedSegments(policy.handler, policy.meta, false, group.segments...)
group.segments = FilterInIndexedSegments(policy.handler, policy.meta, true, group.segments...)
}

collectionTTL, err := getCollectionTTL(collection.Properties)
Expand Down
4 changes: 2 additions & 2 deletions internal/datacoord/compaction_trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ func (t *compactionTrigger) handleGlobalSignal(signal *compactionSignal) error {
}

if Params.DataCoordCfg.IndexBasedCompaction.GetAsBool() {
group.segments = FilterInIndexedSegments(t.handler, t.meta, signal.isForce, group.segments...)
group.segments = FilterInIndexedSegments(t.handler, t.meta, true, group.segments...)
}

coll, err := t.getCollection(group.collectionID)
Expand Down Expand Up @@ -625,7 +625,7 @@ func (t *compactionTrigger) generatePlans(segments []*SegmentInfo, signal *compa
func (t *compactionTrigger) getCandidateSegments(channel string, partitionID UniqueID) []*SegmentInfo {
segments := t.meta.GetSegmentsByChannel(channel)
if Params.DataCoordCfg.IndexBasedCompaction.GetAsBool() {
segments = FilterInIndexedSegments(t.handler, t.meta, false, segments...)
segments = FilterInIndexedSegments(t.handler, t.meta, true, segments...)
}

var res []*SegmentInfo
Expand Down
2 changes: 1 addition & 1 deletion internal/datacoord/garbage_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ func (gc *garbageCollector) recycleDroppedSegments(ctx context.Context) {
droppedCompactTo[to] = struct{}{}
}
}
indexedSegments := FilterInIndexedSegments(gc.handler, gc.meta, false, lo.Keys(droppedCompactTo)...)
indexedSegments := FilterInIndexedSegments(gc.handler, gc.meta, true, lo.Keys(droppedCompactTo)...)
indexedSet := make(typeutil.UniqueSet)
for _, segment := range indexedSegments {
indexedSet.Insert(segment.GetID())
Expand Down
Loading