From d74299770b2f5ed24348ff3fa35df24fdb28f7e4 Mon Sep 17 00:00:00 2001 From: Willi Goesgens Date: Tue, 24 Feb 2015 18:00:52 +0100 Subject: [PATCH] work around race condition occuring during cluster startup on same machine. --- arangod/VocBase/server.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/arangod/VocBase/server.cpp b/arangod/VocBase/server.cpp index 189ed1e3e4..aa4094dee1 100644 --- a/arangod/VocBase/server.cpp +++ b/arangod/VocBase/server.cpp @@ -449,8 +449,15 @@ static int CreateBaseApplicationDirectory (char const* basePath, path); } else { - LOG_ERROR("unable to create base application directory %s", - errorMessage.c_str()); + if ((res != TRI_ERROR_FILE_EXISTS) || (! TRI_IsDirectory(path))) { + LOG_ERROR("unable to create base application directory %s", + errorMessage.c_str()); + } + else { + LOG_INFO("otherone created base application directory '%s'", + path); + res = TRI_ERROR_NO_ERROR; + } } }