anchor.diff:                                             object_storage = StorageInfo} = State) ->
       FunHasChargeOfNode = CompactParams#compact_params.fun_has_charge_of_node,
       HasChargeOfNode    = FunHasChargeOfNode(CompactParams#compact_params.key_bin),
  +    NumActive          = CompactParams#compact_params.num_of_active_object,
   
       case (is_deleted_rec(MetaDBId, Metadata) orelse HasChargeOfNode == false) of
           true ->
  
positive.code: is_deleted_rec(_MetaDBId,_Meta0,_Meta1) ->
      false.
  
  
  %% @doc Execute getting status.
  %% @private
  -spec(do_stats(atom(), #backend_info{}) ->
               {ok, #storage_stats{}} | {error, any()}).
  do_stats(MetaDBId, #backend_info{file_path     = RootPath,
                                   read_handler  = ReadHandler}) ->
      case leo_object_storage_haystack:compact_get(ReadHandler) of
          {ok, Metadata, [_HeaderValue, _KeyValue, _BodyValue, NextOffset]} ->
              case do_stats(MetaDBId, ReadHandler, Metadata, NextOffset, #storage_stats{}) of
                  {ok, Stats} ->
                      {ok, Stats#storage_stats{file_path   = RootPath,
                                               total_sizes = filelib:file_size(RootPath)}};
                  Error ->
                      Error
              end;
          {error, eof} ->
              {ok, #storage_stats{file_path   = RootPath,
                                  total_sizes = filelib:file_size(RootPath)}};
          Error ->
              Error
      end.
  
  -spec(do_stats(atom(), pid(), #metadata{}, integer(), #storage_stats{}) ->
               {ok, any()} | {error, any()}).
  do_stats(MetaDBId, ReadHandler, Metadata, NextOffset, #storage_stats{total_num  = ObjTotal,
                                                                       active_num = ObjActive} = StorageStats) ->
      NewStorageStats =
          case is_deleted_rec(MetaDBId, Metadata) of
              true  -> StorageStats#storage_stats{total_num  = ObjTotal  + 1};
              false -> StorageStats#storage_stats{total_num  = ObjTotal  + 1,
                                                  active_num = ObjActive + 1}
          end,
      case leo_object_storage_haystack:compact_get(ReadHandler, NextOffset) of
          {ok, NewMetadata, [_HeaderValue, _NewKeyValue, _NewBodyValue, NewNextOffset]} ->
              do_stats(MetaDBId, ReadHandler, NewMetadata, NewNextOffset, NewStorageStats);
          {error, eof} ->
              {ok, NewStorageStats};
          Error ->
              Error
      end.
  
  
  %% @doc Reduce unnecessary objects from object-container.
  %% @private
  -spec(do_compact(#metadata{}, #compact_params{}, #state{}) ->
  
negative.code:                     _ = leo_backend_db_api:compact_end(MetaDBId, true),
  
                      BackendInfo = State#state.object_storage,
                      NewState    = State#state{num_of_objects = NumActive,
                                                object_storage =
                                                    BackendInfo#backend_info{
                                                      file_path_raw = TmpFilePathRaw,
                                                      read_handler  = NewReadHandler,
  