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;