You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/07/25 11:00:08 UTC

[GitHub] [skywalking-banyandb] lujiajing1126 commented on a change in pull request #23: Switch to protobuf

lujiajing1126 commented on a change in pull request #23:
URL: https://github.com/apache/skywalking-banyandb/pull/23#discussion_r676126973



##########
File path: banyand/series/trace/write.go
##########
@@ -55,13 +54,16 @@ func (t *traceSeries) Write(seriesID common.SeriesID, shardID uint, entity data.
 	seriesIDBytes := convert.Uint64ToBytes(intSeriesID)
 	wp := t.writePoint(ts)
 
-	err = wp.TimeSeriesWriter(shardID, dataStoreName).Put(seriesIDBytes, entityVal.DataBinaryBytes(), ts)
+	err = wp.TimeSeriesWriter(shardID, dataStoreName).Put(seriesIDBytes, entityVal.GetDataBinary(), ts)
 	if err != nil {
-		return 0, errors.Wrap(err, "failed to write traceSeries data")
+		return 0, errors.Wrap(err, "fail to write traceSeries data")
 	}
-	builder := flatbuffers.NewBuilder(0)
-	builder.Finish(fb.CopyFields(entityVal, builder))
-	err = wp.TimeSeriesWriter(shardID, fieldsStoreName).Put(seriesIDBytes, builder.FinishedBytes(), ts)
+
+	byteVal, err := proto.Marshal(entityVal)

Review comment:
       Fixed




-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org