From f79072638d09511ffbdfd5b69cc0ea88fc3fb7c1 Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Wed, 5 Oct 2022 18:29:15 +0200 Subject: [PATCH] mutation_partition: Print full position in error report in append_clustered_row() std::prev(i) can be dummy. --- mutation_partition.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mutation_partition.cc b/mutation_partition.cc index e59695fed7..82941705a6 100644 --- a/mutation_partition.cc +++ b/mutation_partition.cc @@ -704,7 +704,7 @@ mutation_partition::append_clustered_row(const schema& s, position_in_partition_ auto i = _rows.end(); if (!_rows.empty() && (cmp(*std::prev(i), pos) >= 0)) { throw std::runtime_error(format("mutation_partition::append_clustered_row(): cannot append clustering row with key {} to the partition" - ", last clustering row is equal or greater: {}", pos, std::prev(i)->key())); + ", last clustering row is equal or greater: {}", pos, std::prev(i)->position())); } auto e = alloc_strategy_unique_ptr(current_allocator().construct(s, pos, dummy, continuous)); i = _rows.insert_before_hint(i, std::move(e), cmp).first;