Skip to content

Commit

Permalink
Fix shard_id in memory impl.
Browse files Browse the repository at this point in the history
  • Loading branch information
szmyd committed Sep 2, 2023
1 parent e6ba3f8 commit 47ae4c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/memory/shard_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ ShardManager::Result< ShardInfo > MemoryHomeObject::_create_shard(pg_id pg_owner

auto const now = get_current_timestamp();
auto& s_set = pg_it->second.second;
auto info = ShardInfo{s_set.size(), pg_owner, ShardInfo::State::OPEN, now, now, size_bytes, size_bytes, 0};
auto s_id = (((uint64_t)pg_owner) << 48) + s_set.size();
auto info = ShardInfo{s_id, pg_owner, ShardInfo::State::OPEN, now, now, size_bytes, size_bytes, 0};

LOGDEBUG("Creating Shard [{}]: in Pg [{}] of Size [{}b]", info.id, pg_owner, size_bytes);

Expand Down

0 comments on commit 47ae4c0

Please sign in to comment.