Skip to content

Commit

Permalink
Better error message for non-increasing index.
Browse files Browse the repository at this point in the history
Attempting to write a non-increasing index version is most likely due to
parallel writes to the same symbol. We now indicate that in the error
message.
  • Loading branch information
IvoDD committed Oct 8, 2024
1 parent 9fe6242 commit 0714c53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/arcticdb/version/version_map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ class VersionMapImpl {
entry->validate();

util::check(key.type() != KeyType::TABLE_INDEX || !entry->head_.has_value() || key.version_id() > entry->head_->version_id(),
"Trying to write a non-increasing TABLE_INDEX key. New version: {}, Last version: {}",
"Trying to write a non-increasing TABLE_INDEX key. New version: {}, Last version: {}. This is most likely due to parallel writes to the same symbol, which is not supported.",
key.version_id(), entry->head_ ? entry->head_->version_id() : VariantId{""});
auto journal_key = to_atom(std::move(journal_single_key(store, key, entry->head_)));
write_to_entry(entry, key, journal_key);
Expand Down

0 comments on commit 0714c53

Please sign in to comment.