iilyak commented on a change in pull request #1370: [5/5] Clustered Purge
Implementation
URL: https://github.com/apache/couchdb/pull/1370#discussion_r197405682
##########
File path: src/couch/src/couch_db.erl
##########
@@ -496,33 +497,13 @@ purge_client_exists(DbName, DocId, Props) ->
end.
-get_purge_client_fun(DocId, Props) ->
- M0 = couch_util:get_value(<<"verify_module">>, Props),
- M = try
- binary_to_existing_atom(M0, latin1)
- catch error:badarg ->
- Fmt1 = "Missing index module '~p' for purge checkpoint '~s'",
- couch_log:error(Fmt1, [M0, DocId]),
- throw(failed)
- end,
+get_purge_client_fun(Type) ->
+ couch_db_plugin:get_purge_client_fun(
+ Type, fun get_purge_client_fun_int/1).
Review comment:
This is no reason to provide `get_purge_client_fun_int`. If you look at
`couch_db_plugin:maybe_handle/3` there is a clause `no_decision when
is_function(Default)`, that is the one you use. However, there is also second
clause `no_decission ->`. You can write
`couch_db_plugin:get_purge_client_fun(Type, undefined)`
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services