Skip to content

fix: fix RPCTransportFactory setting bug - #18497

Open
Alchuang22-dev wants to merge 1 commit into
apache:masterfrom
Alchuang22-dev:fix/RPCTransportFactory
Open

fix: fix RPCTransportFactory setting bug#18497
Alchuang22-dev wants to merge 1 commit into
apache:masterfrom
Alchuang22-dev:fix/RPCTransportFactory

Conversation

@Alchuang22-dev

Copy link
Copy Markdown
Contributor

Description

Fix #18475
Fix the RPC transport factory cache so clients with different Thrift buffer and maximum frame-size configurations do not share an incorrectly configured singleton.

Content

  • Cache DeepCopyRpcTransportFactory instances by compression mode, buffer size, and maximum frame size.
  • Update Session and JDBC clients to obtain the factory using their own configuration.
  • Preserve the existing server-side INSTANCE and reInit() behavior.
  • Add a regression test verifying that different maximum frame sizes work independently.

The new behavier would act as:

DeepCopyRpcTransportFactory factory =
    DeepCopyRpcTransportFactory.getInstance(bufferSize, maxFrameSize);

transport = factory.getTransport(...);

This PR has:

  • been self-reviewed.
    • concurrent read
    • concurrent write
    • concurrent read and write
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods.
  • added or updated version, license, or notice information
  • added comments explaining the "why" and the intent of the code wherever would not be obvious
    for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold
    for code coverage.
  • added integration tests.
  • been tested in a test IoTDB cluster.

Key changed/added classes (or packages if there are too many classes) in this PR

@RkGrit
RkGrit requested a lite review from Copilot August 19, 2026 14:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] thrift_max_frame_size设置后未生效

2 participants