anchor.diff:  get_doc_info(DbId, DocId,  #{ db := Db}, ReadOptions) ->
     get_doc_info(DbId, DocId,  Db, ReadOptions);
   get_doc_info(DbId, DocId,  Db, ReadOptions) ->
  -  DocKey = << 100, 0, DbId/binary, DocId/binary >>,
  +  DocKey = doc_key(DbId, DocId),
     case erocksdb:get(Db, DocKey, ReadOptions) of
       {ok, BinDocInfo} -> {ok, binary_to_term(BinDocInfo)};
       not_found -> {error, not_found}
  
positive.code:     not_found ->
        DbId = barrel_lib:uniqid(),
        Batch =  [
          {put, DbKey, DbId},
          {put, meta_key(DbId, <<"version">>), integer_to_binary(?VERSION)},
          {put, meta_key(DbId, <<"update_seq">>), integer_to_binary(0)}
        ],
        ok = erocksdb:write(Db,Batch, [{sync, true}]),
        {DbId, 0}
    end.
  
  clean_db(Name, DbId, #{db := Db}) ->
    ok = erocksdb:delete(Db, << 1, 0, Name/binary >>, [{sync, true}]),
    spawn(fun() -> clean_db1(Db, DbId) end),
    ok.
  
  all_dbs(#{db := Db}) ->
    Fun = fun
            (<< 1, 0, Name/binary >>, _, Acc) -> {ok, [Name | Acc]};
            (_, _, _Acc) -> stop
          end,
    AllDbs = fold_prefix(Db, << 1, 0 >>, Fun, []),
    lists:usort(AllDbs).
  
  clean_db1(Db, DbId) ->
    (catch clean_db_prefix(Db, << 10, 0, DbId/binary, 0 >>)),
    (catch clean_db_prefix(Db, << 100, 0, DbId/binary >>)),
    (catch clean_db_prefix(Db, << 200, 0, DbId/binary >>)),
    (catch clean_db_prefix(Db, << 300, 0, DbId/binary >>)),
    ok.
  
  clean_db_prefix(Db, Prefix) ->
  
negative.code:   {ok, #{db => Db }}.
  
  open_db(#{ db := Db }, Name) ->
    DbKey = << 0, 0, 0, 100, (barrel_lib:to_binary(Name))/binary >>,
    case erocksdb:get(Db, DbKey, []) of
      {ok, DbId} ->
        UpdateSeq = get_update_seq(Db, DbId),
  