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 2021/03/31 09:49:40 UTC

[GitHub] [couchdb] iilyak opened a new pull request #3485: Configurable filter fields

iilyak opened a new pull request #3485:
URL: https://github.com/apache/couchdb/pull/3485


   ## Overview
   
   Do not log by default potentially long list of messages received by terminated process. Currently we log `messages` field in the termination report. This means that we try to process whole message queue of a process before we write the log entry.
   An example of a log message we are trying to reduce is as follows:
   
   ```
   Jan 13 20:18:22 c-fdbcore-perf-api-546dc8d4d8-6hx5n db error [error] 2021-01-13T20:18:22.322515Z dbcore@172.30.74.10 <0.381.0> -------- CRASH REPORT Process fabric2_txids (<0.381.0>) with 0 neighbors exited with reason: {bad_info,{#Ref<0.3875778607.1050673154.132562>,ready}} at gen_server:handle_common_reply/8(line:726) <= proc_lib:init_p_do_apply/3(line:247); initial_call: {fabric2_txids,init,['Argument__1']}, ancestors: [fabric2_sup,<0.377.0>], message_queue_len: 1, messages: [{'$gen_cast',{remove,<<21,22,21,255,22,6,74,23,8,...>>}}], links: [<0.378.0>], dictionary: [{fdb_directory,[<<"perf">>]},{'$erlfdb_error',undefined},{'$fabric_db_handle',...}], trap_exit: false, status: running, heap_size: 6772, stack_size: 27, reductions: 348809
   ```
   
   ## Testing recommendations
   
   The regular `make check` should work. To run tests selectively you can use:
   
   ```
   make eunit apps=couch_log tests=couch_log_config_test_
   ```
   
   ## Related Issues or Pull Requests
   
   N/A
   
   ## Checklist
   
   - [x] Code is written and works correctly
   - [x] Changes are covered by tests
   - [x] Any new configurable parameters are documented in `rel/overlay/etc/default.ini`
   - [ ] A PR for documentation changes has been made in https://github.com/apache/couchdb-documentation
   


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

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



[GitHub] [couchdb] bessbd commented on a change in pull request #3485: Configurable filter fields

Posted by GitBox <gi...@apache.org>.
bessbd commented on a change in pull request #3485:
URL: https://github.com/apache/couchdb/pull/3485#discussion_r604775913



##########
File path: src/couch_log/src/couch_log_config.erl
##########
@@ -104,4 +105,23 @@ transform(strip_last_msg, "false") ->
     false;
 
 transform(strip_last_msg, _) ->
-    true.
+    true;
+
+transform(filter_fields, FieldsStr) ->
+    Default = [pid, registered_name, error_info, messages],

Review comment:
       Should this maybe go to a `DEF`?




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

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



[GitHub] [couchdb] bessbd commented on a change in pull request #3485: Configurable filter fields

Posted by GitBox <gi...@apache.org>.
bessbd commented on a change in pull request #3485:
URL: https://github.com/apache/couchdb/pull/3485#discussion_r604775913



##########
File path: src/couch_log/src/couch_log_config.erl
##########
@@ -104,4 +105,23 @@ transform(strip_last_msg, "false") ->
     false;
 
 transform(strip_last_msg, _) ->
-    true.
+    true;
+
+transform(filter_fields, FieldsStr) ->
+    Default = [pid, registered_name, error_info, messages],

Review comment:
       Should this maybe go to a `define`?




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

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



[GitHub] [couchdb] iilyak commented on a change in pull request #3485: Configurable filter fields

Posted by GitBox <gi...@apache.org>.
iilyak commented on a change in pull request #3485:
URL: https://github.com/apache/couchdb/pull/3485#discussion_r605680934



##########
File path: src/couch_log/src/couch_log_config.erl
##########
@@ -104,4 +105,23 @@ transform(strip_last_msg, "false") ->
     false;
 
 transform(strip_last_msg, _) ->
-    true.
+    true;
+
+transform(filter_fields, FieldsStr) ->
+    Default = [pid, registered_name, error_info, messages],

Review comment:
       I followed the approach in other functions of this module (see line 100 and 104). 




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

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



[GitHub] [couchdb] iilyak merged pull request #3485: Configurable filter fields

Posted by GitBox <gi...@apache.org>.
iilyak merged pull request #3485:
URL: https://github.com/apache/couchdb/pull/3485


   


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

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