Skip to content

Commit

Permalink
Fix the latency type in the executionResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiee committed Dec 8, 2021
1 parent 6ccf173 commit ab822bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/common/graph/ExecutionResponseOps-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct TccStructTraits<::nebula::ExecutionResponse> {
if (false) {
} else if (_fname == "error_code") {
fid = 1;
_ftype = apache::thrift::protocol::T_I32;
_ftype = apache::thrift::protocol::T_I64;
} else if (_fname == "latency_in_us") {
fid = 2;
_ftype = apache::thrift::protocol::T_I32;
Expand Down Expand Up @@ -75,7 +75,7 @@ uint32_t Cpp2Ops<::nebula::ExecutionResponse>::write(Protocol* proto,
::nebula::ErrorCode>::write(*proto,
obj->errorCode);
xfer += proto->writeFieldEnd();
xfer += proto->writeFieldBegin("latency_in_us", apache::thrift::protocol::T_I32, 2);
xfer += proto->writeFieldBegin("latency_in_us", apache::thrift::protocol::T_I64, 2);
xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral,
int32_t>::write(*proto, obj->latencyInUs);
xfer += proto->writeFieldEnd();
Expand Down Expand Up @@ -134,7 +134,7 @@ _readField_error_code : {
}
_readField_latency_in_us : {
::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral,
int32_t>::read(*proto, obj->latencyInUs);
int64_t>::read(*proto, obj->latencyInUs);
isset_latency_in_us = true;
}

Expand Down Expand Up @@ -216,7 +216,7 @@ _readField_comment : {
}
}
case 2: {
if (LIKELY(_readState.fieldType == apache::thrift::protocol::T_I32)) {
if (LIKELY(_readState.fieldType == apache::thrift::protocol::T_I64)) {
goto _readField_latency_in_us;
} else {
goto _skip;
Expand Down Expand Up @@ -276,7 +276,7 @@ uint32_t Cpp2Ops<::nebula::ExecutionResponse>::serializedSize(
xfer += ::apache::thrift::detail::pm::protocol_methods<
::apache::thrift::type_class::enumeration,
::nebula::ErrorCode>::serializedSize<false>(*proto, obj->errorCode);
xfer += proto->serializedFieldSize("latency_in_us", apache::thrift::protocol::T_I32, 2);
xfer += proto->serializedFieldSize("latency_in_us", apache::thrift::protocol::T_I64, 2);
xfer += ::apache::thrift::detail::pm::
protocol_methods<::apache::thrift::type_class::integral, int32_t>::serializedSize<false>(
*proto, obj->latencyInUs);
Expand Down Expand Up @@ -314,7 +314,7 @@ uint32_t Cpp2Ops<::nebula::ExecutionResponse>::serializedSizeZC(
xfer += ::apache::thrift::detail::pm::protocol_methods<
::apache::thrift::type_class::enumeration,
::nebula::ErrorCode>::serializedSize<false>(*proto, obj->errorCode);
xfer += proto->serializedFieldSize("latency_in_us", apache::thrift::protocol::T_I32, 2);
xfer += proto->serializedFieldSize("latency_in_us", apache::thrift::protocol::T_I64, 2);
xfer += ::apache::thrift::detail::pm::
protocol_methods<::apache::thrift::type_class::integral, int32_t>::serializedSize<false>(
*proto, obj->latencyInUs);
Expand Down
2 changes: 1 addition & 1 deletion src/interface/storage.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct ResponseCommon {
// Only contains the partition that returns error
1: required list<PartitionResult> failed_parts,
// Query latency from storage service
2: required i32 latency_in_us,
2: required i64 latency_in_us,
3: optional map<string,i32> latency_detail_us,
}

Expand Down

0 comments on commit ab822bd

Please sign in to comment.