You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/10/11 18:33:24 UTC

[GitHub] tonysun83 commented on a change in pull request #1649: Add document_purges counter for stats

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:
users@infra.apache.org


With regards,
Apache Git Services