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

Commit 5406e57

Browse files
committed
Erase async_open entry in failure case
COUCHDB-2749
1 parent b3d1028 commit 5406e57

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/couch_server.erl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ handle_call({open_result, DbName, {ok, Db}}, {FromPid, _Tag}, Server) ->
375375
handle_call({open_result, DbName, {error, eexist}}, From, Server) ->
376376
handle_call({open_result, DbName, file_exists}, From, Server);
377377
handle_call({open_result, DbName, Error}, {FromPid, _Tag}, Server) ->
378+
erase({async_open, DbName}),
378379
% icky hack of field values - compactor_pid used to store clients
379380
[#db{fd=ReqType, compactor_pid=Froms}=Db] = ets:lookup(couch_dbs, DbName),
380381
[gen_server:reply(From, Error) || From <- Froms],

0 commit comments

Comments
 (0)