mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-03 21:47:10 +00:00
sstables: index_reader: Fix abort in advance_and_check_if_present()
Happens when the key is missing and after all keys in the sstables. Fixes #2345.
This commit is contained in:
@@ -500,6 +500,9 @@ public:
|
||||
// Like advance_to(dht::ring_position_view), but returns information whether the key was found
|
||||
future<bool> advance_and_check_if_present(dht::ring_position_view key) {
|
||||
return advance_to(key).then([this, key] {
|
||||
if (eof()) {
|
||||
return make_ready_future<bool>(false);
|
||||
}
|
||||
return ensure_partition_data().then([this, key] {
|
||||
dht::ring_position_comparator cmp(*_sstable->_schema);
|
||||
return cmp(key, partition_key()) == 0;
|
||||
|
||||
Reference in New Issue
Block a user