Cloudstack 8656 adding messages to empty catch blocks#637
Conversation
|
@wilderrodrigues @wido @bhaisaab @rajesh-battala @koushik-das @kishankavala @K0zka |
|
cloudstack-pull-rats #151 SUCCESS |
|
cloudstack-pull-requests #849 SUCCESS |
|
cloudstack-pull-rats #152 SUCCESS |
|
cloudstack-pull-requests #850 SUCCESS |
|
cloudstack-pull-analysis #84 SUCCESS |
|
cloudstack-pull-analysis #85 SUCCESS |
|
Since all these "ignore" messages are logged at INFO level, it needs to be ensured that logs are not getting filled up too soon. Also I see lot of instances for InterruptedException, I think they can they be excluded. |
|
Nice you took time to have a look at those. It really helps sys admins to know what is going on with ACS. However, I would rather have them logged as WARN over INFO. Why? Because if we fall into the catch block, is because something went wrong or might probably require manual intervention. If you agree, would that be a lot of work to change them into WARN? Concerning the logs getting filled up too soon, I wouldn't really bother. From my point of view that's an admin task to have a clever rotation of logs. If ACS code base was more robust, we could afford less logs and filling up files wouldn't be a problem. But since it isn't, let's make sure the users/admins are aware about what is happening. With respect to the InterruptedExceptions, we can log them as debug, but ignoring them completely wouldn't be nice. Cheers, |
|
@koushik-das, Ignoring interrupted exceptions means that you do not allow the user or other threads to interrupt you. To me that seems serious. I did not in any case see comment about why it was done so I rigorously added the messages. |
|
Fair enough, @DaanHoogland Thanks for the exaplanation. :) LGTM 👍 |
|
@DaanHoogland |
|
@kishankavala you actually made me think I should wait till after 4.6, on the other hand we will have to take the pain in a release. |
|
Code wise it is LGTM |
|
@kishankavala @DaanHoogland 👍 for the Jira ticket. After 4.6 we can come back to this and assess the messages accordingly. But would be nice to have the logs in systems running 4.6. Cheers, |
|
Changes LGTM, since we are creating a separate bug for correctly handling log levels. |
|
So @koushik-das Do you propose the folowing?
|
|
@DaanHoogland Merge this in 4.6. If possible push the log level changes in 4.6 as well. |
|
So I will amend the interrupted to be level debug and then merge. next I will create a new PR for any remaining empty catch blocks, @koushik-das. |
using regexp "catch\s*\(\s*(Exception|Throwable)\s*\w*\)\s*\{\s*\}"
510b195 to
e2b6237
Compare
|
cloudstack-pull-rats #163 SUCCESS |
|
cloudstack-pull-requests #861 SUCCESS |
|
cloudstack-pull-analysis #96 SUCCESS |
Cloudstack 8656 adding messages to empty catch blocks
* pr/637:
CLOUDSTACK-8656: debug messages on interupted exceptions
CLOUDSTACK-8656: code in comment removed
CLOUDSTACK-8656: filling empty catch block with info messages using regexp "catch\s*\(\s*(Exception|Throwable)\s*\w*\)\s*\{\s*\}"
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com> Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
filling empty catch clauses with log messages