diff --git a/banyand/measure/part.go b/banyand/measure/part.go index 1e89b1e9c..f4b6b812e 100644 --- a/banyand/measure/part.go +++ b/banyand/measure/part.go @@ -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) diff --git a/banyand/stream/part.go b/banyand/stream/part.go index b4ad9d47f..d0dce1f90 100644 --- a/banyand/stream/part.go +++ b/banyand/stream/part.go @@ -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)