From dd67de721863a02e5eede3e602749a5e6fd9e004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Dziepak?= Date: Thu, 1 Dec 2016 15:16:33 +0000 Subject: [PATCH] storage_proxy: make sure coordinator has complete data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit got_incomplete_information() ensures that the coordinator has received all required data from all replicas. (see 77dbe3c12fccf5f7f58b46b31794d94e073be3c9 "storage_proxy: fix reconciliation with limits" for the examples when that may not be the case). However, this function is called only if reconciled result has at least as much rows as the user asked for. This was correct when we had only total row limit: if the result was shorter than that either all replicas sent all data they have or the coordinator will retry anyway. However, since then we got partition limit and per partition row limit and a request may be limited by one of these while being still below the total row limit. Signed-off-by: Paweł Dziepak --- service/storage_proxy.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/storage_proxy.cc b/service/storage_proxy.cc index 8e415e5022..90197ea7e5 100644 --- a/service/storage_proxy.cc +++ b/service/storage_proxy.cc @@ -2072,7 +2072,7 @@ public: } if (has_diff) { - if (_total_live_count >= original_row_limit && !any_partition_short_read() + if (!any_partition_short_read() && got_incomplete_information(*schema, cmd, original_row_limit, original_per_partition_limit, original_partition_limit, reconciled_partitions, versions)) { return {};