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

[feature] Re-define the Manual Compaction API sets #39571

Open
1 task done
XuanYang-cn opened this issue Jan 24, 2025 · 0 comments
Open
1 task done

[feature] Re-define the Manual Compaction API sets #39571

XuanYang-cn opened this issue Jan 24, 2025 · 0 comments
Assignees
Labels
kind/feature Issues related to feature request from users

Comments

@XuanYang-cn
Copy link
Contributor

XuanYang-cn commented Jan 24, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe.

See also: milvus-io/pymilvus#2593

Compact has 3 APIs, GetCompactionState and GetCompactionStateWithPlans are very hard to use, and the user can only get compactionID of ManualCompaction return.

func ManualCompaction(
    collectionID int64,
    timetravel uint64, # deprecated
    majorCompaction: bool,
    collection_name: str.
    db_name: str,
)

func GetCompactionState(
    compactionID: int64
)
GetCompactionStateWithPlans(
    compactionID: int64
)

Describe the solution you'd like.

Proposal Zero: ManualCompaction should be controlled by ratelimiter.

Proposal One: Add rpc ListCompactions to fetch a collection's compactionIDs

rpc ListCompactions(listReq) listResp

message listReq {
    str db_name = 1;
    str collection_name = 2;
}

message listResp {
    repeated int64 finishedCompactionIDs = 1;
    repeated int64 unfinishedCompactionIDs = 2;
    //or
    repeated int64 manualCompactionIDs = 1;
    repeated int64 autoCompactionIDs = 2;
}

Design Chooses

There're too many compactions of one collection. Might need to GC faster.

  1. Does it return ALL compactionIDs, or just ManualCompaction triggered compactionIDs?
  • All compactionIDs have too many compactions, just return manual triggered
  • Maybe a way to debug auto compactions????
  1. Do we need to group by finished/unfished or auto/manual, or just a big large list?
  • Do we need to debug/get information about auto compactions? This info is very handy to build a segment tree for debug.
  • Big larget list seems useless for anyone, there might be too many of it.

Proposal Two: Add DescribeCompaction and dup GetCompactionState

rpc DescribeCompaction(req DescribeCompactionReq) CompactionStates
message DescribeCompactionReq {
   int64 compactionID = 1;
}

message CompactionPlanState {
    int64 planID = 1;
    CompactionType type = 2;
    common.CompactionState state = 3;
    repeated int64 InputSegments = 4;
    repeated int64 OutputSegments = 5;
}

message CompactionStates {
    commonStatus status = 1;
    common.CompactionState state = 2;
    repeated CompactionPlanState planStates = 3;
}

Proposal xxx: Enable to Manual compact any type.

Describe an alternate solution.

No response

Anything else? (Additional Context)

No response

@XuanYang-cn XuanYang-cn added the kind/feature Issues related to feature request from users label Jan 24, 2025
@XuanYang-cn XuanYang-cn self-assigned this Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Issues related to feature request from users
Projects
None yet
Development

No branches or pull requests

1 participant