andygrove opened a new pull request, #3555:
URL: https://github.com/apache/datafusion-comet/pull/3555

   ## Summary
   
   - Initialize the tokio runtime worker thread count from 
`spark.executor.cores` instead of defaulting to all CPU cores
   - Resolves executor cores on the Scala side via `numDriverOrExecutorCores()` 
(handles `local`, `local[N]`, `local[*]`, and cluster modes) and injects the 
resolved value into the native config map
   - Replaces `Lazy<Runtime>` with `OnceLock<Runtime>` so the runtime can be 
initialized with the correct thread count from `createPlan()`
   
   ### Priority chain (highest to lowest)
   1. `COMET_WORKER_THREADS` env var — explicit override (unchanged)
   2. `spark.executor.cores` — Spark-aware default
   3. Tokio default (all CPU cores) — only if `get_runtime()` called before 
`createPlan`
   
   ## Test plan
   
   - [ ] `cd native && cargo build` passes
   - [ ] Existing tests pass (runtime API is unchanged)
   - [ ] Check logs for "Comet tokio runtime" message showing correct thread 
count
   - [ ] Verify env var override: `COMET_WORKER_THREADS=2` still takes 
precedence
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to