提交 67b1c96a 编写于 作者: Q QinZuoyan 提交者: acelyc111

server: fix iterate_count of multi_get (#215)

上级 9ea23114
......@@ -727,8 +727,6 @@ void pegasus_server_impl::on_multi_get(const ::dsn::apps::multi_get_request &req
it->Seek(start);
bool first_exclusive = !start_inclusive;
while (count < max_kv_count && size < max_kv_size && it->Valid()) {
iterate_count++;
// check stop sort key
int c = it->key().compare(stop);
if (c > 0 || (c == 0 && !stop_inclusive)) {
......@@ -747,6 +745,8 @@ void pegasus_server_impl::on_multi_get(const ::dsn::apps::multi_get_request &req
}
}
iterate_count++;
// extract value
int r = append_key_value_for_multi_get(resp.kvs,
it->key(),
......@@ -778,8 +778,6 @@ void pegasus_server_impl::on_multi_get(const ::dsn::apps::multi_get_request &req
bool first_exclusive = !stop_inclusive;
std::vector<::dsn::apps::key_value> reverse_kvs;
while (count < max_kv_count && size < max_kv_size && it->Valid()) {
iterate_count++;
// check start sort key
int c = it->key().compare(start);
if (c < 0 || (c == 0 && !start_inclusive)) {
......@@ -798,6 +796,8 @@ void pegasus_server_impl::on_multi_get(const ::dsn::apps::multi_get_request &req
}
}
iterate_count++;
// extract value
int r = append_key_value_for_multi_get(reverse_kvs,
it->key(),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册