[
https://issues.apache.org/jira/browse/IMPALA-11184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17795198#comment-17795198
]
ASF subversion and git services commented on IMPALA-11184:
----------------------------------------------------------
Commit 3381fbf761989ce46da4f83a952bd247dc652ff8 in impala's branch
refs/heads/master from Riza Suminto
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=3381fbf76 ]
IMPALA-12595: Allow automatic removal of old logs from previous PID
IMPALA-11184 add code to target specific PID for log rotation. This
align with glog behavior and grant safety. That is, it is strictly limit
log rotation to only consider log files made by the currently running
Impalad and exclude logs made by previous PID or other living-colocated
Impalads. The downside of this limit is that logs can start accumulate
in a node when impalad is frequently restarted and is only resolvable by
admin doing manual log removal.
To help avoid this manual removal, this patch adds a backend flag
'log_rotation_match_pid' that relax the limit by dropping the PID in
glob pattern. Default value for this new flag is False. However, for
testing purpose, start-impala-cluster.py will override it to True since
test minicluster logs to a common log directory. Setting
'log_rotation_match_pid' to True will prevent one impalad from
interfering with log rotation of other impalad in minicluster.
As a minimum exercise for this new log rotation behavior,
test_breakpad.py::TestLogging is modified to invoke
start-impala-cluster.py with 'log_rotation_match_pid' set to False.
Testing:
- Add test_excessive_cerr_ignore_pid and test_excessive_cerr_match_pid.
- Split TestLogging into two. One run test_excessive_cerr_ignore_pid in
core exploration, while the other run the rest of logging tests in
exhaustive exploration.
- Pass exhaustive tests.
Change-Id: I599799e73f27f941a1d7f3dec0f40b4f05ea5ceb
Reviewed-on: http://gerrit.cloudera.org:8080/20754
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> Log rotation can fail if FLAGS_log_filename is set with custom value
> --------------------------------------------------------------------
>
> Key: IMPALA-11184
> URL: https://issues.apache.org/jira/browse/IMPALA-11184
> Project: IMPALA
> Issue Type: Bug
> Components: Backend
> Affects Versions: Impala 4.0.0
> Reporter: Riza Suminto
> Assignee: Riza Suminto
> Priority: Minor
> Fix For: Impala 4.1.0
>
>
> There are several places where we use FLAGS_log_filename as glob pattern:
> [https://github.com/apache/impala/8eeb000/master/be/src/common/logging.cc#L104]
>
> [https://github.com/apache/impala/8eeb000/master/be/src/common/logging.cc#L340]
>
> If FLAGS_log_filename is not set, it will be initialized with
> google::ProgramInvocationShortName(), which will lead to correct behavior of
> DeleteOldLogs() and GetLatestCanonicalLogPath(). But if user set custom value
> to this flag, the glob pattern will mistakenly target the symlink instead of
> the actual log files. This can be a problem in minicluster where we start
> multiple impalad sharing the same log dir.
> We should replace them with google::ProgramInvocationShortName().
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]