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

   **Search before asking**
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   **Paimon version**
   master @ 33dbcfcb17
   
   **Compute Engine**
   Engine-agnostic (Lumina vector index build).
   
   **Minimal reproduce step**
   Build a Lumina vector index with `lumina.diskann.build.thread_count` set, 
for example to 7, on JDK 8 (or JDK 11+ with `--add-opens 
java.base/java.util=ALL-UNNAMED`, which Paimon's test setup uses). After 
`LuminaVectorGlobalIndexWriter.finish()`, 
`System.getenv("LUMINA_EXECUTOR_THREAD_COUNT")` returns `"7"` for the rest of 
the JVM's life, although nobody set that variable.
   
   `LuminaVectorGlobalIndexWriter.setEnv` writes the value into the map behind 
`System.getenv()` by reflection. That map is a Java-side copy of the 
environment. liblumina reads `LUMINA_EXECUTOR_THREAD_COUNT` with libc `getenv` 
when it sizes its executor, so it never sees the write. Every Java reader of 
`System.getenv()` does, including `ProcessBuilder` children that copy the JVM 
environment.
   
   **What doesn't meet your expectations?**
   The write has no effect on the native executor, and it changes the JVM's 
view of its own environment. The option itself still works: the native DiskANN 
builder reads `diskann.build.thread_count` from the build options. The 
reflective write and its javadoc should go, and the option description should 
say that the executor size comes from the process environment.
   
   **Anything else?**
   The executor size can only be changed by setting 
`LUMINA_EXECUTOR_THREAD_COUNT` before the process starts.
   
   **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