fix pcode calculate issue
This commit is contained in:
7
deps/oblib/src/rpc/obrpc/ob_rpc_stat.h
vendored
7
deps/oblib/src/rpc/obrpc/ob_rpc_stat.h
vendored
@ -147,6 +147,12 @@ private:
|
||||
template <int N>
|
||||
void RpcStatBulk<N>::add_piece(const RpcStatPiece &piece)
|
||||
{
|
||||
if (piece.reset_dcount_){
|
||||
for (int64_t i = 0; i < N; i++) {
|
||||
// only reset dcount, no need lock
|
||||
items_[i].add_piece(piece);
|
||||
}
|
||||
} else {
|
||||
const int64_t start = rand_.get(0, N - 1);
|
||||
for (int64_t i = 0;; i++) {
|
||||
const int64_t idx = (i + start) % N;
|
||||
@ -159,6 +165,7 @@ void RpcStatBulk<N>::add_piece(const RpcStatPiece &piece)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <int N>
|
||||
void RpcStatBulk<N>::get_item(RpcStatItem &item) const
|
||||
|
Reference in New Issue
Block a user