Skip to content

Commit

Permalink
Fixes batch_restore_version not increasing version_id
Browse files Browse the repository at this point in the history
batch_restore_version used the last undeleted version to determine the
next_version_id. This is wrong because we might have a deleted latest
version.
  • Loading branch information
IvoDD committed Sep 11, 2024
1 parent 34e9551 commit 52cdc81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/arcticdb/version/local_versioned_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1515,7 +1515,7 @@ std::vector<std::pair<VersionedItem, TimeseriesDescriptor>> LocalVersionedEngine
util::check(stream_ids.size() == version_queries.size(), "Symbol vs version query size mismatch: {} != {}", stream_ids.size(), version_queries.size());
auto sym_versions = get_sym_versions_from_query(stream_ids, version_queries);
util::check(sym_versions.size() == version_queries.size(), "Restore versions requires specific version to be supplied");
auto previous = batch_get_latest_version(store(), version_map(), stream_ids, false);
auto previous = batch_get_latest_version(store(), version_map(), stream_ids, true);
auto versions_to_restore = batch_get_specific_version(store(), version_map(), sym_versions);
std::vector<folly::Future<std::pair<VersionedItem, TimeseriesDescriptor>>> fut_vec;

Expand Down

0 comments on commit 52cdc81

Please sign in to comment.