From 82525d53e354de65b7a041a2e44f5792a0d42707 Mon Sep 17 00:00:00 2001 From: Jie Yao Date: Thu, 7 Dec 2023 18:16:35 -0700 Subject: [PATCH] update comments --- src/lib/homestore_backend/hs_shard_manager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/homestore_backend/hs_shard_manager.cpp b/src/lib/homestore_backend/hs_shard_manager.cpp index 3a401ae1..b692d56b 100644 --- a/src/lib/homestore_backend/hs_shard_manager.cpp +++ b/src/lib/homestore_backend/hs_shard_manager.cpp @@ -180,8 +180,9 @@ bool HSHomeObject::do_shard_message_pre_commit(int64_t lsn, ReplicationMessageHe switch (header.msg_type) { case ReplicationMessageType::SEAL_SHARD_MSG: { // we can not release chunk here, since if rollback happens, we can not make sure we can get the same chunk. - // it might be selected by other creat_shard after we release it. - // we need to wait for the commit phase to release chunk; + // chunk selector will always return the a chunk of least used, and GC will happen at the time window + // we can not make sure we can get the same chunk as before, so we need to wait for the commit phase to release + // chunk; update_shard_in_map(shard_info); if (ctx) { ctx->promise_.setValue(ShardManager::Result< ShardInfo >(shard_info)); } break;