anchor.diff:      ok | {error, Reason :: term()}.
   compact_db(Shard) ->
       Pid = enterdb_ns:get(Shard),
  -    gen_server:call(Pid, compact_db).
  +    call(Pid, compact_db).
   
   %%--------------------------------------------------------------------
   %% @doc
  
positive.code: %% @spec terminate(Reason, State) -> void()
  %% @end
  %%--------------------------------------------------------------------
  terminate(_Reason, _State = #state{db_ref = undefined}) ->
      ok;
  terminate(_Reason, _State = #state{shard = Shard,
  				   it_mon = MonMap}) ->
      ?debug("Terminating worker for shard: ~p", [Shard]),
      maps:fold(fun(Mref, Pid, _Acc) ->
  		erlang:demonitor(Mref, [flush]),
  		Res = (catch gen_server:stop(Pid)),
  		?debug("Stop iterator: ~p", [Res])
  	      end, ok, MonMap),
      ensure_closed(Shard).
  
  %%--------------------------------------------------------------------
  %% @private
  %% @doc
  %% Convert process state when code is changed
  %%
  %% @spec code_change(OldVsn, State, Extra) -> {ok, NewState}
  %% @end
  %%--------------------------------------------------------------------
  code_change(_OldVsn, State, _Extra) ->
      {ok, State}.
  
  %%%===================================================================
  %%% Internal functions
  %%%===================================================================
  -spec ensure_directories(Args :: map(),
  			 Subdir :: string(),
  			 Shard :: string()) ->
  
negative.code:     {ok, Value :: term()} | {error, Reason :: term()}.
  delete_indices(Shard, Cids) ->
      ServerRef = enterdb_ns:get(Shard),
      call(ServerRef, {delete_indices, Cids}).
  
  %%--------------------------------------------------------------------
  %% @doc
  