Riza Suminto has uploaded this change for review. ( http://gerrit.cloudera.org:8080/18031
Change subject: IMPALA-11020: Reattach STDOUT/STDERR independently. ...................................................................... IMPALA-11020: Reattach STDOUT/STDERR independently. IMPALA-5256 made an incorrect assumption that glog will rotate both INFO and ERROR logs at the same time. A race condition can happen between glog's log rotation and symlink resolutions in AttachStdoutStderrLocked because impala does not hold glog's log_mutex. This patch fixes the issue by replacing the DCHECK with a log, warning if only one symlink has changed. We then reattach the stream only for the one pointing to a new file. The next AttachStdoutStderr call after logbufsecs will handle redirection for the slower log rotation. This patch also adds explicit log flush after logging statements that intent to initialize a new log file. Testing: - Pass the exhaustive test. Change-Id: I35bbed631773bf7a4d55b2b77df1a093f34dedc5 --- M be/src/common/logging.cc 1 file changed, 28 insertions(+), 14 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/31/18031/1 -- To view, visit http://gerrit.cloudera.org:8080/18031 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I35bbed631773bf7a4d55b2b77df1a093f34dedc5 Gerrit-Change-Number: 18031 Gerrit-PatchSet: 1 Gerrit-Owner: Riza Suminto <riza.sumi...@cloudera.com>