taoran92 opened a new issue, #11133:
URL: https://github.com/apache/paimon/issues/11133

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   ### Paimon version
   
   master (245680119a4efee32a50d4abb8953624e8272ce6)
   
   ### Compute Engine
   
   Hive 3.1.2, Hadoop 2.8.5, JDK 8 on Linux.
   
   ### Minimal reproduce step
   
   1. Start two embedded Hive 3.1 test servers in separate JVMs with OS `umask 
022`, using the default `hive.query.results.cache.directory` 
(`/tmp/hive/_resultscache_`). The cache directory must initially be absent.
   2. Pause JVM A after it creates the directory but before it sets its 
permissions to `0733`.
   3. Let JVM B initialize its query results cache, then resume JVM A.
   
   Directory creation and permission setting are separate operations. The 
failing interleaving is:
   
   ```text
   Time    JVM A                              JVM B
   ----    -----                              -----
     1     Cache directory does not exist
     2     Create directory; mode is 0755
     3                                        Directory already exists
     4                                        Read mode 0755; permission check 
fails
     5     Set directory mode to 0733
     6     Initialization succeeds            HiveServer startup has already 
failed
   ```
   
   Hive requires the directory permissions to include all bits in `0733`; 
`0755` lacks group/other write permission. JVM B skips directory creation 
because the directory already exists and checks its permissions before JVM A 
finishes setting them. Without controlling this timing, the failure is 
intermittent.
   
   ### What doesn't meet your expectations?
   
   Expected: Concurrent Hive integration tests should initialize successfully 
without interfering with each other's query results cache directory.
   
   Actual: `HiveWriteITCase` can fail while starting HiveServer in its 
class-level setup, before any test method runs:
   
   ```text
   java.lang.IllegalStateException: Failed to create HiveServer :Error 
initializing the query results cache
   Caused by: java.lang.RuntimeException: The dir: /tmp/hive/_resultscache_ on 
HDFS should be writable. Current permissions are: rwxr-xr-x
       at 
org.apache.hadoop.hive.ql.exec.Utilities.ensurePathIsWritable(Utilities.java:4501)
   ```
   
   ### Anything else?
   
   The same permission error appears in the JDK 8 CI logs of 
[#10975](https://github.com/apache/paimon/actions/runs/41625008622/job/125880197509)
 and 
[#11129](https://github.com/apache/paimon/actions/runs/43249420031/job/131402667447).
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to