1
(veronica1@10.20.0.68)13> {ok, Ref} = erocksdb:open("data/test.db", [{create_if_missing, true}], []).
{ok, <<>>}
(veronica1@10.20.0.68)14> Ref =:= <<>>.
true
(veronica1@10.20.0.68)15> erocksdb:get(Ref, <<"a">>, []).
{ok,<<"b">>}
(veronica1@10.20.0.68)16> erocksdb:get(<<>>, <<"a">>, []).
** exception error: bad argument
     in function  erocksdb:async_get/4
        called as erocksdb:async_get(#Ref<0.0.8.180>,<<>>,<<"a">>,[])
     in call from erocksdb:get/3 (/Users/tiexiao/code/my_projects/riak_core_x/_build/default/lib/erocksdb/src/erocksdb.erl, line 339)

为什么“Ref”如此特别?

有谁能够帮我?

4

0 回答 0