Skip to content

Commit

Permalink
Add debug info
Browse files Browse the repository at this point in the history
Signed-off-by: Gao Hongtao <[email protected]>
  • Loading branch information
hanahmily committed Sep 13, 2024
1 parent e361665 commit d72675d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions banyand/measure/part.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,13 @@ func (pw *partWrapper) ID() uint64 {
return pw.p.partMetadata.ID
}

func (pw *partWrapper) String() string {
if pw.mp != nil {
return fmt.Sprintf("mem part %v", pw.mp.partMetadata)
}
return fmt.Sprintf("part %v", pw.p.partMetadata)
}

func mustOpenFilePart(id uint64, root string, fileSystem fs.FileSystem) *part {
var p part
partPath := partPath(root, id)
Expand Down
7 changes: 7 additions & 0 deletions banyand/stream/part.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,13 @@ func (pw *partWrapper) ID() uint64 {
return pw.p.partMetadata.ID
}

func (pw *partWrapper) String() string {
if pw.mp != nil {
return fmt.Sprintf("mem part %v", pw.mp.partMetadata)
}
return fmt.Sprintf("part %v", pw.p.partMetadata)
}

func mustOpenFilePart(id uint64, root string, fileSystem fs.FileSystem) *part {
var p part
partPath := partPath(root, id)
Expand Down

0 comments on commit d72675d

Please sign in to comment.