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 2022/11/08 20:08:12 UTC

[GitHub] [couchdb] iilyak commented on a diff in pull request #4261: Improve index cleanup

iilyak commented on code in PR #4261:
URL: https://github.com/apache/couchdb/pull/4261#discussion_r1017067561


##########
src/couch_mrview/src/couch_mrview_debug.erl:
##########
@@ -41,7 +46,12 @@ help() ->
         index_view_state,
         index_report,
         view_report,
-        index_view_report
+        index_view_report,
+        active_signatures,

Review Comment:
   So far for debug functions I tried to split them into two categories. The functions which return the data and functions which print reports.
   
   - For functions which return data the suffix `_state` was used. 
   - For functions which print reports the suffix `_report` was used.
   
   The `_report` functions so far supported two ways of invoking them.
   
   - pass same arguments as arguments of `_state` functions 
   - pass the data structure returned by `_state` function
   
   This allows few things:
   1.  retrieving raw data for manipulation
   2. printing nice reports with minimum number of arguments
   3. complex pipelines where following steps are implemented
     - `_state` function are called to get raw data
     - the raw data are filtered based on arbitrary criteria (possibly implemented as a remsh function)
     - call `_report` function with filtered data to get only what we need.
     
   I think with very little change this PR could do the same.
   
   See https://github.com/apache/couchdb/commit/963daf6ca9df5815973bb6934c3fdc02b905f6f9 to get better idea of the API.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org