mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
mutation_reader_merger: don't query the kind of moved-from fragment
Call mutation_fragment_kind() on the fragment *before* it's moved as there are not guarantees for the state of a moved-from object (apart from that it's in a valid one). Signed-off-by: Botond Dénes <bdenes@scylladb.com> Message-Id: <c47b1e22877bb9499f1fbb9d513093c29ef1901b.1512635422.git.bdenes@scylladb.com>
This commit is contained in:
@@ -204,8 +204,9 @@ future<mutation_reader_merger::mutation_fragment_batch> mutation_reader_merger::
|
||||
do {
|
||||
boost::range::pop_heap(_fragment_heap, fragment_heap_compare(*_schema));
|
||||
auto& n = _fragment_heap.back();
|
||||
const auto kind = n.fragment.mutation_fragment_kind();
|
||||
_current.emplace_back(std::move(n.fragment));
|
||||
_next.emplace_back(n.reader, n.fragment.mutation_fragment_kind());
|
||||
_next.emplace_back(n.reader, kind);
|
||||
_fragment_heap.pop_back();
|
||||
}
|
||||
while (!_fragment_heap.empty() && equal(_current.back().position(), _fragment_heap.front().fragment.position()));
|
||||
|
||||
Reference in New Issue
Block a user