Extract arrow-base plugin - #21465
Conversation
d557143 to
35e224a
Compare
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit 35e224a.
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. |
35e224a to
2ef1707
Compare
PR Reviewer Guide 🔍(Review updated until commit 6ebbe9d)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 6ebbe9d Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 6f70664
Suggestions up to commit 4de448a
Suggestions up to commit 0dbde84
Suggestions up to commit 0f7c161
Suggestions up to commit a8a779c
|
|
❌ Gradle check result for 2ef1707: 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? |
2ef1707 to
f9b5e24
Compare
|
Persistent review updated to latest commit f9b5e24 |
|
❌ Gradle check result for f9b5e24: 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? |
f9b5e24 to
3d4ea11
Compare
|
Persistent review updated to latest commit 3d4ea11 |
|
❕ Gradle check result for 3d4ea11: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #21465 +/- ##
============================================
+ Coverage 73.56% 73.58% +0.02%
+ Complexity 74882 74867 -15
============================================
Files 5994 5992 -2
Lines 339592 339581 -11
Branches 48948 48949 +1
============================================
+ Hits 249811 249892 +81
+ Misses 69893 69801 -92
Partials 19888 19888 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3d4ea11 to
d011fc8
Compare
|
Persistent review updated to latest commit d011fc8 |
d011fc8 to
fa5a63f
Compare
|
Persistent review updated to latest commit fa5a63f |
fa5a63f to
348719d
Compare
|
Persistent review updated to latest commit 348719d |
|
❌ Gradle check result for 348719d: 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? |
348719d to
e5cad8b
Compare
|
Persistent review updated to latest commit e5cad8b |
|
❌ Gradle check result for e5cad8b: 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? |
e5cad8b to
a9f67da
Compare
|
Persistent review updated to latest commit a9f67da |
Plugins are initialized in topological order (dependencies first), but Node.close() previously closed them in the same forward order. This means a dependency plugin (e.g. arrow-base owning the root allocator) could close before its dependents (e.g. analytics-engine holding child allocators), causing spurious IllegalStateExceptions. Reverse the plugin list before closing so dependents release resources before their dependencies. This matches the standard construct-in-order / destroy-in-reverse convention. With ordering now guaranteed, remove the defensive catch in AnalyticsSearchService.close() that was masking potential buffer leaks. Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
QueryContext constructors now require ArrowAllocatorService as the last parameter. Provide a stub implementation in the test. Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
Same fix as other coordinator QA tests — AnalyticsPlugin requires ArrowAllocatorService from the registry at createComponents() time. Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
…rService Replace removed ArrowAllocatorProvider with a test-local RootAllocator for stub batch production, and add ArrowBasePlugin to node plugins so AnalyticsPlugin's registry lookup succeeds. Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
|
Persistent review updated to latest commit 0dbde84 |
Fixes CoordinatorSingleNodeTopologyIT and CoordinatorTwoNodeTopologyIT which inherit plugin setup from this base class. Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
|
Persistent review updated to latest commit 4de448a |
…locators If a consumer plugin fails to close its child allocator before node shutdown, the root allocator throws IllegalStateException. This surfaces the bug clearly in logs while allowing graceful shutdown. Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
|
Persistent review updated to latest commit 6f70664 |
|
❕ Gradle check result for 6f70664: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
|
Persistent review updated to latest commit 6ebbe9d |
|
❌ Gradle check result for 6ebbe9d: null 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? |
|
❌ Gradle check result for 6ebbe9d: 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? |
|
❌ Gradle check result for 6ebbe9d: 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? |
Description
Apache Arrow's JVM classes have object identity tied to
(classloader, FQN). If two plugins each bundle their own copy ofarrow-vector, aVectorSchemaRootproduced by one can't be consumed by the other — different classloaders, different classes,ClassCastExceptionat the handoff. This PR introducesarrow-baseas the single place Arrow lives: every Arrow-using plugin declaresextendedPlugins = ['arrow-base']and shares its classloader.ArrowAllocatorServiceThe previous static
ArrowAllocatorProvideris replaced with a proper node-level service.ArrowBasePluginprovidesDefaultArrowAllocatorService— one root allocator per node, child allocators for each consumer.PluginComponentRegistryPlugins are initialized in dependency order (topologically sorted by
extendedPlugins). This PR introducesPluginComponentRegistry— a typed lookup that accumulates components as each plugin initializes. Later plugins discover services from their dependencies atcreateComponents()time without Guice or deferred resolution.FlightStreamPluginandAnalyticsPluginobtainArrowAllocatorServicefrom the registry directly.ArrowBasePluginalso provides a Guice binding viacreateGuiceModules()for@Injectconsumers (DefaultPlanExecutor, transport actions).Plugin close order
Node.close()now closes plugins in reverse dependency order, so child allocators are released before the root. This eliminates the need for defensive exception swallowing on shutdown.Testing
Integration tests using
FlightStreamPluginmust declare it inadditionalNodePlugins()withextendedPlugins = [ArrowBasePlugin]so the test framework sorts initialization correctly (the standardnodePlugins()API doesn't preserve dependency metadata).Non-goals
arrow-c-datastays in parquet (FFM-only). Flight-internal types stay in flight — only types used by ≥2 plugins move.Related Issues
N/A
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.