opensearch-project / opensearch-project/performance-analyzer

[BUG] PerformanceAnalyzerTransportChannel does not delegate to original TransportChannel that it wraps

Open
#606 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
48
Forks
78
Avg merge
1d 2h
Merged PRs (30d)
5

Description

When receiving a transport request, the security plugin relies on getting the version of the node that transmitted the request by calling on channel.getVersion(). When the original TransportChannel is wrapped by PerformanceAnalyzerTransportChannel, there is an issue where the version returned by channel.getVersion() is not accurate and instead gives the version of the node that received the transport request. In a homogenous cluster, that is not an issue, but it is an issue during rolling upgrades when a cluster is mixed.

See more details in the security repo here: https://github.com/opensearch-project/security/issues/3771

The problem is that PA instantiates a PerformanceAnalyzerTransportChannel w/o any args and then sets the original channel in a separate set call. Since PerformanceAnalyzerTransportRequestHandler does not override TransportChannel.getVersion() and delegate the call to the wrapped original channel, it will instead use the default implementation of TransportChannel.getVersion and return Version.CURRENT of the receiving node.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with PerformanceAnalyzerTransportRequestHandler.java at the construction and separate setter call linked in the issue, then compare its behavior with TransportChannel.getVersion() in OpenSearch. Confirm that the wrapped original channel's version is returned during mixed-version rolling upgrades, and check any relevant transport tests before considering the issue done.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, observability
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.