You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/03/18 01:34:00 UTC

[jira] [Commented] (IMPALA-11184) Log rotation can fail if FLAGS_log_filename is set with custom value

    [ https://issues.apache.org/jira/browse/IMPALA-11184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17508506#comment-17508506 ] 

ASF subversion and git services commented on IMPALA-11184:
----------------------------------------------------------

Commit 87f3dc294f160823af999fd004babb967ecb1fe5 in impala's branch refs/heads/master from Riza Suminto
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=87f3dc2 ]

IMPALA-11184: Use ProgramInvocationShortName for log glob pattern

Impala uses FLAGS_log_filename as log symlink name and as part of the
glob pattern during log rotation. The user will not set this flag in
most cases, and it will default to google::ProgramInvocationShortName().
But if the user sets a custom value to this flag, the glob pattern will
mistakenly target the symlink instead of the actual log files. This
leads to a wrong behavior of DeleteOldLogs() and
GetLatestCanonicalLogPath().

This patch replace FLAGS_log_filename with
google::ProgramInvocationShortName() in glob pattern.

Testing:
- Pass simple-logger-test
- Pass exhaustive test_breakpad.py::TestLogging

Change-Id: I6c71bdb67f70c571d18fb8630d4a816ab75686fa
Reviewed-on: http://gerrit.cloudera.org:8080/18326
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> 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
>
> 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.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org