netbox: reduce spam in netbox logs#11727
Conversation
53b6054 to
1658801
Compare
Serpentian
left a comment
There was a problem hiding this comment.
Thank you for the patch, finally vshard users will stop complaining about spam in logs!
Here we balance between code readability and functionality, and I'm on the side of the readability, since we can afford to loose a real error in logs for now, IMHO. But I'd rather create a ticket after that patch for introducing different error codes in the net.box, one error code for all errors is definitely not enough
c5cbb43 to
828d4cd
Compare
828d4cd to
de7e650
Compare
Serpentian
left a comment
There was a problem hiding this comment.
I like the new logic of error handling, but we need to simplify the pushing of an error to Lua, since we already have all this code written and should not reimplement it)
adf63aa to
f4e5435
Compare
Before this patch a lot of "Connection refused" records were printed in log files during netbox connection. This happened in two general situations: 1) Current instance tries to connect to non-existent instance. 2) Current instance loses a succeeded connection to another instance. The spam in logs was appearing because we didn't have any logic in `netbox_worker_f` which would control periodic errors' logging during netbox connection. Now, we fix this issue by passing a whole error object into lua stack instead of errmsg and changing logic of errors' displaying in `new_sm` netbox lua function. We display error in "warning" mode only if 1) This error is the first one in netbox session. 2) Current and previous error has different types (codes). 3) Current and previous error has different messages and different types of parent error. Otherwise, current error will be repeated in "verbose" mode. Closes tarantool#10506 NO_DOC=bugfix
f4e5435 to
3bd36fa
Compare
Serpentian
left a comment
There was a problem hiding this comment.
Thank you for the patch! It'll finally stop clogging logs. Good work
sergepetrenko
left a comment
There was a problem hiding this comment.
Thanks for the fix!
|
Successfully created backport PR for |
|
Successfully created backport PR for |
|
Successfully created backport PR for |
|
Successfully created backport PR for |
Backport summary
|
Before this patch a lot of "Connection refused" records were printed in
log files during netbox connection. This happened in two general
situations:
The spam in logs was appearing because we didn't have any logic in
netbox_worker_fwhich would control periodic errors' logging duringnetbox connection.
Now, we fix this issue by passing a whole error object into lua stack
instead of errmsg and changing logic of errors' displaying in
new_smnetbox lua function. We display error in "warning" mode only if
of parent error.
Otherwise, current error will be repeated in "verbose" mode. Also we print
an information about how many seconds it will take to reconnect (after
Connection refusederror).Closes #10506
NO_DOC=bugfix