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/06/08 05:56:28 UTC
[GitHub] tonysun83 commented on a change in pull request #538: Catch Database Do Not Exist Error
tonysun83 commented on a change in pull request #538: Catch Database Do Not Exist Error
URL: https://github.com/apache/couchdb/pull/538#discussion_r120805046
##########
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:
@iilyak : I think that depends on whether or not info level would be helpful for the user or if it will just add to logging clutter.
----------------------------------------------------------------
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