Skip to content

Commit

Permalink
Always allow vbucket deletion.
Browse files Browse the repository at this point in the history
Previously, we would only allow vbucket deletion for vbuckets in the
"dead" state.  This is consistent with the outward face of bucket
engine, but for our internal usage, it just makes stuff take longer.

Change-Id: If9b573434b488b009c88db926b3608ac235bbc9d
  • Loading branch information
dustin committed Jun 9, 2011
1 parent 3e16253 commit 537452f
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/mc_couch_vbucket.erl
Expand Up @@ -36,14 +36,9 @@ set_vbucket(VBucket, StateName, State) ->
{reply, #mc_response{}, State}.

handle_delete(VBucket, State) ->
case get_state(VBucket, State) of
<<"dead">> ->
DbName = mc_daemon:db_name(VBucket, State),
couch_server:delete(list_to_binary(DbName), []),
#mc_response{};
_ ->
#mc_response{status=?EINVAL, body="vbucket is not dead"}
end.
DbName = mc_daemon:db_name(VBucket, State),
couch_server:delete(list_to_binary(DbName), []),
#mc_response{}.

handle_stats(Socket, Opaque, State) ->
{ok, DBs} = couch_server:all_databases(),
Expand Down

0 comments on commit 537452f

Please sign in to comment.