You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by gi...@git.apache.org on 2017/07/05 21:18:40 UTC
[GitHub] iilyak commented on a change in pull request #538: Catch Database Do Not Exist Error
iilyak commented on a change in pull request #538: Catch Database Do Not Exist Error
URL: https://github.com/apache/couchdb/pull/538#discussion_r125760158
##########
File path: src/mem3/src/mem3_sync_security.erl
##########
@@ -44,10 +44,20 @@ maybe_sync_int(#shard{name=Name}=Src, Dst) ->
go() ->
{ok, Dbs} = fabric:all_dbs(),
- lists:foreach(fun handle_db/1, Dbs).
+ lists:foreach(fun handle_existing_db/1, Dbs).
go(DbName) when is_binary(DbName) ->
- handle_db(DbName).
+ handle_existing_db(DbName).
+
+handle_existing_db(DbName) ->
+ try handle_db(DbName) of
+ _ -> ok
+ catch
+ error:database_does_not_exist->
+ couch_log:error("Db was deleted while getting security"
Review comment:
@tonysun83: Agree. Let's keep it error. However please add DbName to the message.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services