Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-12595

Allow automatic removal of old logs from previous PID

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 4.3.0
    • Impala 4.4.0
    • Backend
    • None

    Description

      IMPALA-11184 add code to target specific file name pattern for log rotation

      // We specifically target the base file name created by glog.
      // Glog's default base file name follow this pattern:
      // "<program name>.<hostname>.<user name>.log.<severity level>.<date>-<time>.<pid>"
      inline string GlobPatternForLog(google::LogSeverity severity) {
        return strings::Substitute("$0/$1*.log.$2.*.$3", FLAGS_log_dir,
            google::ProgramInvocationShortName(), google::GetLogSeverityName(severity),
            getpid());
      }

      The <pid> component in the pattern 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, Impala should consider relaxing the limit a bit by dropping the <pid> pattern, at least once on Impalad startup or at very first log rotation.

      Attachments

        Issue Links

          Activity

            People

              rizaon Riza Suminto
              rizaon Riza Suminto
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: