From 47ae4c02b6457753c05df06e5794113d77eba03c Mon Sep 17 00:00:00 2001 From: Brian Szmyd Date: Fri, 1 Sep 2023 20:54:43 -0600 Subject: [PATCH] Fix shard_id in memory impl. --- src/lib/memory/shard_manager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/memory/shard_manager.cpp b/src/lib/memory/shard_manager.cpp index 14a72b73..59e46626 100644 --- a/src/lib/memory/shard_manager.cpp +++ b/src/lib/memory/shard_manager.cpp @@ -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);