ARROW-4996: [Plasma] Enable uninstalling of signal handler and fix log_dir#4013
ARROW-4996: [Plasma] Enable uninstalling of signal handler and fix log_dir#4013guoyuhong wants to merge 5 commits intoapache:masterfrom
Conversation
fsaintjacques
left a comment
There was a problem hiding this comment.
Why do you need to de-register the signal handler?
cpp/src/arrow/util/logging.h
Outdated
There was a problem hiding this comment.
Do both variables need to be kept publicly? They could be private static in InstallFailureSignalHandler.
There was a problem hiding this comment.
Will change it for app_name_, but for log_dir_, this variable will be used in 2 functions. It is better to keep it as a static variable.
There was a problem hiding this comment.
but it doesn't need to be public, you can move it into the implementation (logging.cc).
There was a problem hiding this comment.
@fsaintjacques Do you have more comments on this PR?
|
In some rare cases, when plasma is exiting in abnormal cases, |
|
@pitrou Could you take a look? |
pitrou
left a comment
There was a problem hiding this comment.
I fail to understand why this solves the "There are many duplicated log files in /tmp" issue. Can you explain?
|
@pitrou We pass empty |
|
There's a big warning on deadlock about using glog's signal handler feature and linux 64-bits. https://github.com/google/glog/blob/6deff5ab23be84f8fb5cd434905eb3672d95c82f/INSTALL#L13-L67 Usually, libraries should not install signal handlers, only applications (plasma client/server). |
|
@fsaintjacques Yes. We may meet the dead log problem and after we de-register the signal handler this problem is gone. Yes, currently, only Plasma_Store calls |
|
Thanks @guoyuhong. I will wait for CI and then merge. |
|
Oops, sorry... I missed something. If only Plasma store registers the signal handlers, then only Plasma store should unregister the signal handlers. Especially as the method sets them to |
Codecov Report
@@ Coverage Diff @@
## master #4013 +/- ##
=========================================
+ Coverage 87.85% 88.65% +0.8%
=========================================
Files 736 602 -134
Lines 90595 80975 -9620
Branches 1252 0 -1252
=========================================
- Hits 79594 71791 -7803
+ Misses 10884 9184 -1700
+ Partials 117 0 -117
Continue to review full report at Codecov.
|
|
@pitrou Do you mean that we should separate the function |
|
@guoyuhong Right. |
|
@pitrou I have moved |
UninstallSignalActionis added at exiting time.log_diris empty, we should not call InitGoogleLogging, which means there should be not log files. Iflog_diris not empty, we should callSetLogDestinationfor different log levels.