refactor(query): simplify SpillsBufferPool with owned runtime and configurable settings#19781
Conversation
…figurable settings - SpillsBufferPool now owns a dedicated Runtime instead of borrowing GlobalIORuntime - Remove SpillTarget from public buffer pool APIs; callers no longer derive it - Add spill_buffer_pool_memory and spill_buffer_pool_workers to SpillConfig - Track buffer pool blocking time via atomic counters for observability - Simplify BufferWriter by removing SpillTarget and redundant comments - Clean up tests to use multi_thread tokio flavor
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0ffaf5413d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Docker Image for PR
|
🤖 CI Job Analysis (Retry 2)
📊 Summary
✅ AUTO-RETRY INITIATED1 job(s) retried due to infrastructure issues (runner failures, timeouts, etc.) 🔍 Job Details
🤖 AboutAutomated analysis using job annotations to distinguish infrastructure issues (auto-retried) from code/test issues (manual fixes needed). |
…eateWriter ops Background workers were directly awaiting Fetch and CreateWriter ops in their event loop, blocking the worker thread for the duration of the I/O. With only 2 workers, concurrent Fetch/CreateWriter ops could starve reader_task_loop tasks (spawned via tokio::spawn onto the same runtime), causing recv_blocking() in SpillsDataReader::read() to hang indefinitely. Fix: spawn Fetch and CreateWriter as independent tasks, consistent with WriterTask and ReaderTask, so workers remain free to dequeue new ops. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f91b43173b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…figurable settings (#19781) * refactor(query): simplify SpillsBufferPool with owned runtime and configurable settings - SpillsBufferPool now owns a dedicated Runtime instead of borrowing GlobalIORuntime - Remove SpillTarget from public buffer pool APIs; callers no longer derive it - Add spill_buffer_pool_memory and spill_buffer_pool_workers to SpillConfig - Track buffer pool blocking time via atomic counters for observability - Simplify BufferWriter by removing SpillTarget and redundant comments - Clean up tests to use multi_thread tokio flavor * z * z * fix(query): prevent hang in SpillsBufferPool by spawning Fetch and CreateWriter ops Background workers were directly awaiting Fetch and CreateWriter ops in their event loop, blocking the worker thread for the duration of the I/O. With only 2 workers, concurrent Fetch/CreateWriter ops could starve reader_task_loop tasks (spawned via tokio::spawn onto the same runtime), causing recv_blocking() in SpillsDataReader::read() to hang indefinitely. Fix: spawn Fetch and CreateWriter as independent tasks, consistent with WriterTask and ReaderTask, so workers remain free to dequeue new ops. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * z * z * z * z * z * z --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
refactor(query): simplify SpillsBufferPool with owned runtime and configurable settings
Tests
Type of change
This change is