diff --git a/src/server/pegasus_server_impl.cpp b/src/server/pegasus_server_impl.cpp index 5311f7f822..f7692f59ab 100644 --- a/src/server/pegasus_server_impl.cpp +++ b/src/server/pegasus_server_impl.cpp @@ -975,7 +975,6 @@ void pegasus_server_impl::on_multi_get(const ::dsn::apps::multi_get_request &req } else { // condition: !request.sort_keys.empty() bool error_occurred = false; rocksdb::Status final_status; - int32_t multiget_count = 0; bool exceed_limit = false; std::vector<::dsn::blob> keys_holder; std::vector keys; @@ -1012,7 +1011,6 @@ void pegasus_server_impl::on_multi_get(const ::dsn::apps::multi_get_request &req } // check ttl if (status.ok()) { - multiget_count++; uint32_t expire_ts = pegasus_extract_expire_ts(_pegasus_data_version, value); if (expire_ts > 0 && expire_ts <= epoch_now) { expire_count++; @@ -1027,7 +1025,7 @@ void pegasus_server_impl::on_multi_get(const ::dsn::apps::multi_get_request &req // extract value if (status.ok()) { // check if exceed limit - if (multiget_count > max_iteration_count || size > max_iteration_size) { + if (count >= max_kv_count || size >= max_kv_size) { exceed_limit = true; break; }