You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2020/06/02 05:21:35 UTC

[impala] branch master updated: IMPALA-9798: avoid racy hole punch check in test env

This is an automated email from the ASF dual-hosted git repository.

tarmstrong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git


The following commit(s) were added to refs/heads/master by this push:
     new 75fb964  IMPALA-9798: avoid racy hole punch check in test env
75fb964 is described below

commit 75fb96415119b3b807ce52f809763893930411c5
Author: Tim Armstrong <ta...@cloudera.com>
AuthorDate: Fri May 29 17:26:17 2020 -0700

    IMPALA-9798: avoid racy hole punch check in test env
    
    The issue was that multiple Impala daemons would start up
    around the same time and remove then re-create the impala-scratch
    subdirectory. This raced with the hole punch check, which created
    a file in that directory.
    
    The fix is to create the hole punch test file up a level in
    the directory structure, not inside impala-scratch.
    
    Testing
    * Ran exhaustive build.
    
    Change-Id: I6ded24014486e930d1ab47a1e5e9c791c3d7de05
    Reviewed-on: http://gerrit.cloudera.org:8080/16012
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 be/src/runtime/tmp-file-mgr.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/be/src/runtime/tmp-file-mgr.cc b/be/src/runtime/tmp-file-mgr.cc
index f2e2885..fd0a48a 100644
--- a/be/src/runtime/tmp-file-mgr.cc
+++ b/be/src/runtime/tmp-file-mgr.cc
@@ -238,7 +238,9 @@ Status TmpFileMgr::InitCustom(const vector<string>& tmp_dir_specifiers,
       }
       if (punch_holes_) {
         // Make sure hole punching is supported for the directory.
-        RETURN_IF_ERROR(FileSystemUtil::CheckHolePunch(scratch_subdir_path.string()));
+        // IMPALA-9798: this file should *not* be created inside impala-scratch
+        // subdirectory to avoid races with multiple impalads starting up.
+        RETURN_IF_ERROR(FileSystemUtil::CheckHolePunch(tmp_path.string()));
       }
     }
   }