Correct behavior of batch limit (was size_t)
This commit is contained in:
parent
51e6802aa7
commit
8b9e7e2c65
@ -950,14 +950,10 @@ msgs::ReadResponses ShardRsm::HandleRead(msgs::ExpandOneRequest &&req) {
|
||||
}
|
||||
|
||||
results.emplace_back(maybe_result.value());
|
||||
|
||||
if (batch_limit) { // #NoCommit can be done differently
|
||||
--*batch_limit;
|
||||
if (batch_limit < 0) {
|
||||
if (batch_limit.has_value() && results.size() >= batch_limit.value()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (auto &src_vertex : req.src_vertices) {
|
||||
// Get Vertex acc
|
||||
@ -985,14 +981,11 @@ msgs::ReadResponses ShardRsm::HandleRead(msgs::ExpandOneRequest &&req) {
|
||||
}
|
||||
|
||||
results.emplace_back(result.value());
|
||||
if (batch_limit) { // #NoCommit can ebd one differently
|
||||
--*batch_limit;
|
||||
if (batch_limit < 0) {
|
||||
if (batch_limit.has_value() && results.size() >= batch_limit.value()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
msgs::ExpandOneResponse resp{};
|
||||
resp.success = action_successful;
|
||||
|
Loading…
Reference in New Issue
Block a user