Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonYao287 committed Dec 8, 2023
1 parent 4dc0358 commit 82525d5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/homestore_backend/hs_shard_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 82525d5

Please sign in to comment.