Ádám Bakai has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/20016


Change subject: async_logger: Workaround for randomly failing to create logfile
......................................................................

async_logger: Workaround for randomly failing to create logfile

Glog has a function called GetLoggingDirectories, which explicitly not
thread-safe[1]. The comment promises it's not an issue since it is called
in InitGoogle, but it's not true right now, so it's called in Write the
first time and returns a not fully constructed vector.

The workaround simply makes sure so that the first write is can not be
overlapped with the second write, so that the first execution of
GetLoggingDirectories can not be overlapped with the second execution of
GetLoggingDirectories.

1: 
https://github.com/google/glog/blob/674283420118bb919f83ceb3d9dee31ef43ff3aa/src/logging.cc#L2325
Change-Id: I3e5cb73261015833c45ca5dd24e03bd1198b55ef
---
M src/kudu/util/async_logger.cc
1 file changed, 11 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/16/20016/1
--
To view, visit http://gerrit.cloudera.org:8080/20016
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e5cb73261015833c45ca5dd24e03bd1198b55ef
Gerrit-Change-Number: 20016
Gerrit-PatchSet: 1
Gerrit-Owner: Ádám Bakai <aba...@cloudera.com>

Reply via email to