Call eleveldb:close before destroy #368

Merged
merged 2 commits into from Jul 19, 2012
View
4 rebar.config
@@ -16,8 +16,8 @@
{branch, "1.2"}}},
{ebloom, "1.1.1", {git, "git://github.com/basho/ebloom", {tag, "1.1.1"}}},
{eper, "0.61", {git, "git://github.com/basho/eper.git", {tag, "3280b736"}}},
- {eleveldb, "1.2.0", {git, "git://github.com/basho/eleveldb.git",
- {tag, "1.2.0"}}},
+ {eleveldb, "1.2.1", {git, "git://github.com/basho/eleveldb.git",
+ {tag, "1.2.1"}}},
{sext, "0.4.*", {git, "git://github.com/esl/sext", {tag, "0.4.1"}}},
{riak_pipe, "1.2.0", {git, "git://github.com/basho/riak_pipe.git",
{branch, "1.2"}}},
View
1 src/riak_kv_eleveldb_backend.erl
@@ -277,6 +277,7 @@ fold_objects(FoldObjectsFun, Acc, Opts, #state{fold_opts=FoldOpts,
%% and return a fresh reference.
-spec drop(state()) -> {ok, state()} | {error, term(), state()}.
drop(State0) ->
+ eleveldb:close(State0#state.ref),
case eleveldb:destroy(State0#state.data_root, []) of
ok ->
case open_db(State0) of