Add a string func for allocation (#20610)

Signed-off-by: yangxuan <xuan.yang@zilliz.com>

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
pull/20620/head
XuanYang-cn 2022-11-15 19:21:12 +08:00 committed by GitHub
parent 2dc6d0c92a
commit 3d4cfe14f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -91,6 +91,11 @@ type Allocation struct {
ExpireTime Timestamp
}
func (alloc Allocation) String() string {
t, _ := tsoutil.ParseTS(alloc.ExpireTime)
return fmt.Sprintf("SegmentID: %d, NumOfRows: %d, ExpireTime: %v", alloc.SegmentID, alloc.NumOfRows, t)
}
// make sure SegmentManager implements Manager
var _ Manager = (*SegmentManager)(nil)