Skip to content

Commit

Permalink
fix: fix log bug in multi_get (#652)
Browse files Browse the repository at this point in the history
  • Loading branch information
levy5307 authored Dec 8, 2020
1 parent 8da45c6 commit 6a47a3b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/server/pegasus_server_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,9 @@ void pegasus_server_impl::on_multi_get(multi_get_rpc rpc)
if (r == 1) {
count++;
auto &kv = resp.kvs.back();
limiter->add_size(kv.key.length() + kv.value.length());
uint64_t kv_size = kv.key.length() + kv.value.length();
size += kv_size;
limiter->add_size(kv_size);
} else if (r == 2) {
expire_count++;
} else { // r == 3
Expand Down Expand Up @@ -555,7 +557,9 @@ void pegasus_server_impl::on_multi_get(multi_get_rpc rpc)
if (r == 1) {
count++;
auto &kv = reverse_kvs.back();
limiter->add_size(kv.key.length() + kv.value.length());
uint64_t kv_size = kv.key.length() + kv.value.length();
size += kv_size;
limiter->add_size(kv_size);
} else if (r == 2) {
expire_count++;
} else { // r == 3
Expand Down

0 comments on commit 6a47a3b

Please sign in to comment.