Skip to content

Commit

Permalink
Fix write response metadata field(measure/stream) (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
hailin0 authored Sep 17, 2023
1 parent 9552688 commit 8996af5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/proto/banyandb/measure/v1/write.proto
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ message WriteResponse {
// status indicates the request processing result
model.v1.Status status = 2 [(validate.rules).enum.defined_only = true];
// the metadata from request when request fails
common.v1.Metadata metadata = 3 [(validate.rules).message.required = true];
common.v1.Metadata metadata = 3;
}

message InternalWriteRequest {
Expand Down
2 changes: 1 addition & 1 deletion api/proto/banyandb/stream/v1/write.proto
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ message WriteResponse {
// status indicates the request processing result
model.v1.Status status = 2 [(validate.rules).enum.defined_only = true];
// the metadata from request when request fails
common.v1.Metadata metadata = 3 [(validate.rules).message.required = true];
common.v1.Metadata metadata = 3;
}

message InternalWriteRequest {
Expand Down
2 changes: 1 addition & 1 deletion banyand/liaison/grpc/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (s *streamService) Write(stream streamv1.StreamService_WriteServer) error {
entity, tagValues, shardID, err := s.navigate(writeEntity.GetMetadata(), writeEntity.GetElement().GetTagFamilies())
if err != nil {
s.sampled.Error().Err(err).RawJSON("written", logger.Proto(writeEntity)).Msg("failed to navigate to the write target")
reply(nil, modelv1.Status_STATUS_INTERNAL_ERROR, writeEntity.GetMessageId(), stream, s.sampled)
reply(writeEntity.GetMetadata(), modelv1.Status_STATUS_INTERNAL_ERROR, writeEntity.GetMessageId(), stream, s.sampled)
continue
}
if s.ingestionAccessLog != nil {
Expand Down

0 comments on commit 8996af5

Please sign in to comment.