tonysun83 commented on a change in pull request #1649: Add document_purges 
counter for stats
URL: https://github.com/apache/couchdb/pull/1649#discussion_r224557805
 
 

 ##########
 File path: src/chttpd/src/chttpd_db.erl
 ##########
 @@ -522,6 +522,7 @@ 
db_req(#httpd{method='POST',path_parts=[_,<<"_purge">>]}=Req, Db) ->
         false -> throw({bad_request, "Exceeded maximum number of revisions."});
         true -> ok
     end,
+    couch_stats:increment_counter([couchdb, document_purges], 
length(IdsRevs2)),
 
 Review comment:
   @jiangphcn : If I understand correctly,  the `document_purges` counter 
records how many revisions were actually purged. This would be equal to the 
length of all the revisions. 
   
   If my assumption is correct, what happens if the actual call to 
`fabric:purge_docs` fails the following line?

----------------------------------------------------------------
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

Reply via email to