From e70cfc8f36bf4eb4def8ca486554b8272f842704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Botond=20D=C3=A9nes?= Date: Thu, 17 Aug 2017 09:05:22 +0300 Subject: [PATCH] incremental_reader_selector: account for possibly disengaged lower bound MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In addition to the constructor (fixed previously) the check for no sstables on the first call to select() also has to be prepared for the lower bound of the range being disengaged. Signed-off-by: Botond Dénes Message-Id: <4ab1296c71814fcd492996fa36fd00fd7bbbbc7f.1502949875.git.bdenes@scylladb.com> --- database.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/database.cc b/database.cc index 5e9f68aaaa..5b8173af8b 100644 --- a/database.cc +++ b/database.cc @@ -419,7 +419,8 @@ public: // For the lower bound of the token range the _selector // might not return any sstables, in this case try again // with next_token unless it's maximum token. - if (position == _pr->start()->value().token() && !selection.next_token.is_maximum()) { + if (!selection.next_token.is_maximum() + && position == (_pr->start() ? _pr->start()->value().token() : dht::minimum_token())) { dblog.trace("incremental_reader_selector {}: no sstables intersect with the lower bound, retrying", this); _selector_position = std::move(selection.next_token); return create_new_readers(nullptr);