anchor.diff:        case gen_server:call(Pid, delete_db) of
           ok ->
             lager:info("database ~p deleted ~n", [DbId]),
  -          {DbId, DbPids2} = maps:take(Pid, DbPids),
  +          DbPids2 = maps:remove(Pid, DbPids),
             #{ <<"databases">> := Dbs } = Conf,
             Dbs2 = lists:filter(
               fun
  
positive.code:   end.
  
  do_delete_db(DbId, State = #{ conf := Conf, db_pids := DbPids }) ->
    case ets:take(barrel_dbs, DbId) of
      [] ->
        lager:info("no database ~p ~n", [DbId]),
  
negative.code:       case ets:take(barrel_dbs, DbId) of
          [] -> State;
          [_Db] ->
            lager:warning("~s: database ~p is down~n", [?MODULE_STRING, DbId]),
            ets:delete(barrel_dbs, DbId),
            State#{db_pids => DbPids2}
        end
  