From a8114ab91ced00cb953ba18fa8f39b2186adcfe6 Mon Sep 17 00:00:00 2001 From: Sergey Zolotukhin Date: Fri, 27 Sep 2024 11:28:17 +0200 Subject: [PATCH] Avoid an extra call to block_for in db::filter_for_query. (cherry picked from commit 8db6d6bd5761a0bba14002b74440b695d25cbdf0) --- db/consistency_level.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/consistency_level.cc b/db/consistency_level.cc index 574fd3137f..16064bdc85 100644 --- a/db/consistency_level.cc +++ b/db/consistency_level.cc @@ -260,7 +260,7 @@ filter_for_query(consistency_level cl, size_t bf = block_for(erm, cl); if (read_repair == read_repair_decision::DC_LOCAL) { - bf = std::max(block_for(erm, cl), local_count); + bf = std::max(bf, local_count); } if (bf >= live_endpoints.size()) { // RRD.DC_LOCAL + CL.LOCAL or CL.ALL