Skip to content

[Backport 3.5] Remove dead code from arrow-flight-rpc plugin#20701

Merged
rishabhmaurya merged 1 commit into3.5from
backport/backport-20614-to-3.5
Feb 23, 2026
Merged

[Backport 3.5] Remove dead code from arrow-flight-rpc plugin#20701
rishabhmaurya merged 1 commit into3.5from
backport/backport-20614-to-3.5

Conversation

@opensearch-trigger-bot
Copy link
Copy Markdown
Contributor

Backport cd144de from #20614.

…-rpc (#20614)

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
(cherry picked from commit cd144de)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@opensearch-trigger-bot opensearch-trigger-bot bot requested a review from a team as a code owner February 21, 2026 02:40
@rishabhmaurya
Copy link
Copy Markdown
Contributor

I need to backport this as there is another PR which is on top of these changes #20700

@rishabhmaurya rishabhmaurya added skip-diff-analyzer Maintainer to skip code-diff-analyzer check, after reviewing issues in AI analysis. skip-changelog and removed skip-diff-analyzer Maintainer to skip code-diff-analyzer check, after reviewing issues in AI analysis. labels Feb 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🧪 No relevant tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ Recommended focus areas for review

Initialization Logic

The initialization logic at line 75-81 only initializes ServerConfig when isStreamTransportEnabled is true, but the constructor doesn't fail or log when the feature is disabled. Verify this is the intended behavior and that downstream code handles uninitialized state correctly.

);

/**
 * Setting for Arrow Flight publish host addresses.
 */
public static final Setting<List<String>> SETTING_FLIGHT_PUBLISH_HOST = Setting.listSetting(
    "arrow.flight.publish_host",
Inconsistent Guard

Multiple methods check isStreamTransportEnabled and return empty collections when false. Verify that all plugin lifecycle methods properly handle the disabled state and that no NPE or initialization issues occur when the feature flag is off.

if (!isStreamTransportEnabled) {
    return Collections.emptyList();
}

List<Object> components = new ArrayList<>();
statsCollector = new FlightStatsCollector();
components.add(statsCollector);
return components;

@github-actions
Copy link
Copy Markdown
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Improve exception error message

The generic Exception catch block masks the specific error type, making debugging
difficult. Consider catching more specific exceptions or at least logging the
exception details before wrapping it in a RuntimeException. This will help identify
the root cause of initialization failures.

plugins/arrow-flight-rpc/src/main/java/org/opensearch/arrow/flight/transport/FlightStreamPlugin.java [76-80]

 public FlightStreamPlugin(Settings settings) {
     this.isStreamTransportEnabled = FeatureFlags.isEnabled(FeatureFlags.STREAM_TRANSPORT);
     if (isStreamTransportEnabled) {
         try {
             ServerConfig.init(settings);
         } catch (Exception e) {
-            throw new RuntimeException("Failed to initialize Arrow Flight server", e);
+            throw new RuntimeException("Failed to initialize Arrow Flight server: " + e.getMessage(), e);
         }
     }
 }
Suggestion importance[1-10]: 4

__

Why: The suggestion improves error message clarity by including e.getMessage() in the exception message. However, the impact is minimal since the original exception e is already passed as the cause parameter, which preserves the full stack trace and error details. The improvement only adds redundant message text.

Low

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for c9031ed: 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?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for c9031ed: 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?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for c9031ed: 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?

@github-actions
Copy link
Copy Markdown
Contributor

❕ Gradle check result for c9031ed: 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
Copy link
Copy Markdown

codecov bot commented Feb 23, 2026

Codecov Report

❌ Patch coverage is 40.90909% with 13 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (3.5@c0fc9ae). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...rch/arrow/flight/transport/FlightStreamPlugin.java 0.00% 13 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##             3.5   #20701   +/-   ##
======================================
  Coverage       ?   73.22%           
  Complexity     ?    71879           
======================================
  Files          ?     5781           
  Lines          ?   329057           
  Branches       ?    47449           
======================================
  Hits           ?   240943           
  Misses         ?    68817           
  Partials       ?    19297           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rishabhmaurya rishabhmaurya merged commit 65ea8bb into 3.5 Feb 23, 2026
57 of 67 checks passed
@github-actions github-actions bot deleted the backport/backport-20614-to-3.5 branch February 23, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog skip-diff-analyzer Maintainer to skip code-diff-analyzer check, after reviewing issues in AI analysis.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant