Skip to content

Commit

Permalink
types: add segmentLevel for QuerySegmentResponse (#345)
Browse files Browse the repository at this point in the history
Signed-off-by: ryjiang <[email protected]>
  • Loading branch information
shanghaikid authored Aug 1, 2024
1 parent 7280d92 commit 26a6184
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions milvus/const/milvus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ export enum SegmentState {
Flushing = 'Flushing',
}

// segment level enum
export enum SegmentLevel {
Legacy = 0, // zero value for legacy logic
L0 = 1, // L0 segment, contains delta data for current channel
L1 = 2, // L1 segment, normal segment, with no extra compaction attribute
L2 = 3, // L2 segment, segment with extra data distribution info
}

// compaction state enum
export enum CompactionState {
UndefiedState = 0,
Expand Down
5 changes: 4 additions & 1 deletion milvus/types/Data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
keyValueObj,
DataType,
SegmentState,
SegmentLevel,
ImportState,
ConsistencyLevelEnum,
collectionNameReq,
Expand Down Expand Up @@ -192,8 +193,10 @@ export interface QuerySegmentInfo {
num_rows: number;
index_name: string;
indexID: number;
nodeID: number;
nodeID: number; // deployed node id, use nodeIds instead
state: SegmentState;
nodeIds: number[];
level: SegmentLevel;
}

export interface PersistentSegmentInfo {
Expand Down

0 comments on commit 26a6184

Please sign in to comment.