Skip to content

HBASE-30393 Clear stale RPC response timestamp when it is completed - #8671

Open
Huginn-kio wants to merge 1 commit into
apache:masterfrom
Huginn-kio:HBASE-30393
Open

Huginn-kio wants to merge 1 commit into
apache:masterfrom
Huginn-kio:HBASE-30393

Conversation

@Huginn-kio

Copy link
Copy Markdown
Contributor

HBASE-30393

Summary

SimpleRpcServer can retain a stale response timestamp after a queued response
is fully written. A later stalled response can then be purged based on the
earlier response's timestamp.

Root cause

SimpleRpcServerResponder.processResponse updates lastSentTime for an
incomplete response but does not clear it when the response is complete. It also
refreshes the timestamp when a non-blocking write makes no progress.

Fix

  • Clear lastSentTime when the current response is fully written.
  • Keep or refresh the timestamp only while an incomplete response remains and
    the write makes progress, or when no timestamp has been recorded yet.
  • Do not purge a connection whose response queue is empty.
  • Make lastSentTime visible to the responder and purge paths.
  • Add regression coverage for completed responses, stalled writes, and purge
    behavior.

Testing

  • RED before the fix: TestSimpleRpcServerResponder — 3 tests run, 3 failures,
    0 errors.
  • GREEN after the fix: TestSimpleRpcServerResponder — 3 tests run, 0 failures,
    0 errors.
  • IPC neighbor regression: TestSimpleRpcServer, TestSecureSimpleRpcServer,
    and TestRpcServerSlowConnectionSetup — 4 tests run, 0 failures, 0 errors.
  • Focused Checkstyle for the new test — 0 violations.
  • RAT — 0 unapproved or unknown licenses.
  • SpotBugs — 0 bug instances and 0 errors.
  • package build — successful.

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.

1 participant