hanahmily commented on code in PR #890:
URL:
https://github.com/apache/skywalking-banyandb/pull/890#discussion_r2609219881
##########
banyand/measure/write_standalone.go:
##########
@@ -487,8 +487,16 @@ func (w *writeCallback) Rev(_ context.Context, message
bus.Message) (resp bus.Me
g := groups[i]
for j := range g.tables {
dps := g.tables[j]
+ // Note: In standalone mode, we do NOT generate
series-metadata.bin file.
+ // Series metadata is only persisted in cluster mode
(liaison) for debugging purposes.
if dps.tsTable != nil && dps.dataPoints != nil {
- dps.tsTable.mustAddDataPoints(dps.dataPoints)
+ // Use segment's time range start as segmentID
+ segmentID := int64(0)
+ if dps.segment != nil {
+ segmentID =
dps.segment.GetTimeRange().Start.UnixNano()
+ }
+ // Pass nil for seriesMetadataBytes in
standalone mode
+
dps.tsTable.mustAddDataPointsWithSegmentID(dps.dataPoints, segmentID, nil)
Review Comment:
Revert the changes. The standalone mode doesn't need to set segmentID.
##########
banyand/measure/part.go:
##########
@@ -274,7 +288,55 @@ func (pw *partWrapper) decRef() {
pw.p.close()
if pw.removable.Load() && pw.p.fileSystem != nil {
go func(pw *partWrapper) {
- pw.p.fileSystem.MustRMAll(pw.p.path)
+ // Check if this is a liaison node by checking the path
structure
Review Comment:
Please revert this. If you write seriesMetadata in write_liaison.go, it must
be flushed to disk. You do not have to apply this logic.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]