anchor.diff:      end,
   
       %% retrieve value
  -    FunHasChargeOfNode = CompactParams#compact_params.fun_has_charge_of_node,
  -    NumActive          = CompactParams#compact_params.num_of_active_object,
  -    SizeActive         = CompactParams#compact_params.size_of_active_object,
  +    #compact_params{key_bin  = Key,
  +                    body_bin = Body,
  +                    fun_has_charge_of_node = FunHasChargeOfNode,
  +                    num_of_active_objects  = NumOfActiveObjs,
  +                    size_of_active_object  = SizeActive
  +                   } = CompactParams,
   
       %% set a flag of object of compaction
  -    HasChargeOfNode = FunHasChargeOfNode(Metadata),
  +    NumOfReplicas = Metadata#?METADATA.num_of_replicas,
  +    HasChargeOfNode = FunHasChargeOfNode(Key, NumOfReplicas),
   
       %% execute compaction
       case (is_deleted_rec(MetaDBId, StorageInfo, Metadata)
  
positive.code:             %%
              TmpWriteHandler = StorageInfo#backend_info.tmp_write_handler,
  
              case leo_object_storage_haystack:compact_put(TmpWriteHandler, Metadata,
                                                           CompactParams#compact_params.key_bin,
                                                           CompactParams#compact_params.body_bin) of
                  {ok, Offset} ->
                      NewMeta = Metadata#?METADATA{offset = Offset},
                      KeyOfMetadata = ?gen_backend_key(StorageInfo#backend_info.avs_version_bin_cur,
  
negative.code:                           CompactParams = #compact_params{key_bin     = KeyValue,
                                                            body_bin    = BodyValue,
                                                            next_offset = NextOffset,
                                                            num_of_active_objects = 0,
                                                            size_of_active_object = 0,
                                                            fun_has_charge_of_node = FunHasChargeOfNode},
                            try do_compact(Metadata, CompactParams, State) of
                                Ret ->
  