Skip to content
This repository has been archived by the owner on May 25, 2021. It is now read-only.

Commit

Permalink
Erase async_open entry in failure case
Browse files Browse the repository at this point in the history
COUCHDB-2749
  • Loading branch information
rnewson committed Jul 13, 2015
1 parent b3d1028 commit 5406e57
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/couch_server.erl
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ handle_call({open_result, DbName, {ok, Db}}, {FromPid, _Tag}, Server) ->
handle_call({open_result, DbName, {error, eexist}}, From, Server) ->
handle_call({open_result, DbName, file_exists}, From, Server);
handle_call({open_result, DbName, Error}, {FromPid, _Tag}, Server) ->
erase({async_open, DbName}),
% icky hack of field values - compactor_pid used to store clients
[#db{fd=ReqType, compactor_pid=Froms}=Db] = ets:lookup(couch_dbs, DbName),
[gen_server:reply(From, Error) || From <- Froms],
Expand Down

0 comments on commit 5406e57

Please sign in to comment.