Add configurable coordinator buffer limit for per-query Arrow allocator - #21726
Conversation
PR Reviewer Guide 🔍(Review updated until commit bd85809)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to bd85809 Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 196a47d
Suggestions up to commit 037df7a
Suggestions up to commit abefa15
Suggestions up to commit 4f0a067
Suggestions up to commit f877ed5
|
cfe0415 to
f877ed5
Compare
|
Persistent review updated to latest commit f877ed5 |
f877ed5 to
4f0a067
Compare
|
Persistent review updated to latest commit 4f0a067 |
|
❌ Gradle check result for 4f0a067: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit abefa15.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
|
Persistent review updated to latest commit abefa15 |
|
❌ Gradle check result for abefa15: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
abefa15 to
037df7a
Compare
|
Persistent review updated to latest commit 037df7a |
037df7a to
196a47d
Compare
|
Persistent review updated to latest commit 196a47d |
Replace hardcoded 256MB per-query Arrow allocator limit with dynamic cluster setting `analytics.coordinator.buffer_limit`. Add debug/warn logging at allocator close to detect memory leaks. Signed-off-by: Bowen Lan <bowenlan@amazon.com> Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
- Move coordinator allocator creation to AnalyticsPlugin (proper lifecycle, closed on plugin shutdown) - DefaultPlanExecutor receives it via Guice injection - QueryContext receives a ready-to-use allocator + ownsAllocator flag (no more lazy init or branching inside QueryContext) - Setting value 0 = use coordinator allocator directly (no per-query child) - Guard per-query allocator against leak if QueryContext construction fails - Test factories create per-test child allocators for proper leak isolation Signed-off-by: Bowen Lan <bowenlan@amazon.com> Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
196a47d to
bd85809
Compare
|
Persistent review updated to latest commit bd85809 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #21726 +/- ##
============================================
+ Coverage 73.46% 73.52% +0.05%
+ Complexity 74825 74818 -7
============================================
Files 5997 5997
Lines 339688 339688
Branches 48961 48961
============================================
+ Hits 249558 249745 +187
+ Misses 70272 70023 -249
- Partials 19858 19920 +62 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…or (opensearch-project#21726) * Add configurable coordinator buffer limit for per-query Arrow allocator Replace hardcoded 256MB per-query Arrow allocator limit with dynamic cluster setting `analytics.coordinator.buffer_limit`. Add debug/warn logging at allocator close to detect memory leaks. Signed-off-by: Bowen Lan <bowenlan@amazon.com> Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com> * Refactor coordinator allocator lifecycle and address review feedback - Move coordinator allocator creation to AnalyticsPlugin (proper lifecycle, closed on plugin shutdown) - DefaultPlanExecutor receives it via Guice injection - QueryContext receives a ready-to-use allocator + ownsAllocator flag (no more lazy init or branching inside QueryContext) - Setting value 0 = use coordinator allocator directly (no per-query child) - Guard per-query allocator against leak if QueryContext construction fails - Test factories create per-test child allocators for proper leak isolation Signed-off-by: Bowen Lan <bowenlan@amazon.com> Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com> --------- Signed-off-by: Bowen Lan <bowenlan@amazon.com> Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
Summary
analytics.coordinator.buffer_limit