Skip to content

[rpc] Reject inactive lazy requests before queuing - #4461

Open
platinumhamburg wants to merge 3 commits into
apache:mainfrom
platinumhamburg:fix-produce-request-buffer-lifecycle
Open

platinumhamburg wants to merge 3 commits into
apache:mainfrom
platinumhamburg:fix-produce-request-buffer-lifecycle

Conversation

@platinumhamburg

@platinumhamburg platinumhamburg commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #4460

Prevent inactive lazy requests from reaching the request processor with a released ByteBuf.

Brief change log

  • Reject inactive requests before queue admission.
  • Add regression coverage to the existing NettyServerHandlerTest.
  • Exercise the real RequestProcessor and FileLogRecords.append path.

Without the fix, the test writes a batch that was valid before buffer release but invalid on disk:

Inactive ProduceLogRequest appended 450 bytes; valid before release: true, valid on disk: false

Tests

  • ./mvnw -pl fluss-rpc -am -Dtest=NettyServerHandlerTest -DfailIfNoTests=false test

API and Format

No API or format changes.

Documentation

Not applicable.

@platinumhamburg
platinumhamburg marked this pull request as ready for review September 21, 2026 12:10
@platinumhamburg
platinumhamburg force-pushed the fix-produce-request-buffer-lifecycle branch from 2d2f5a8 to dd4e787 Compare September 21, 2026 13:05
Prevent inactive lazy requests from reaching request processing with released buffers, and cover the resulting invalid log append path.
@platinumhamburg
platinumhamburg force-pushed the fix-produce-request-buffer-lifecycle branch from dd4e787 to 9116bbf Compare September 21, 2026 13:07
@platinumhamburg

Copy link
Copy Markdown
Contributor Author

Thank you, @chaohaochen, for identifying the original bug and conducting a thorough investigation and in-depth analysis of its contextual details. After attempting my own analysis and reproduction based on your findings, I believe the current issue represents a high-confidence root cause.

Could @chaohaochen, @gyang94, and @swuferhong please take the time to review this PR?

@gyang94

gyang94 commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

@platinumhamburg LGTM +1

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.

[rpc] Inactive connections can enqueue lazy requests backed by released buffers

2 participants