Skip to content

HBASE-28620 Release inflight buffer when replication source terminates - #8663

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

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

Conversation

@Huginn-kio

Copy link
Copy Markdown
Contributor

HBASE-28620

Summary

When a replication source terminates while a WAL entry batch is in flight, its buffer quota can remain accounted indefinitely.

Root cause

ReplicationSourceShipper.shipEdits polls a WALEntryBatch from the reader queue. The buffer quota is released after successful shipping through postShipEdits; if the worker stops before successful shipping, the batch is no longer in the reader queue and cleanup cannot release its quota.

Fix

  • Track whether the polled batch was released by successful shipping.
  • Release the batch quota after the shipping loop when it was not successfully shipped.
  • Add a regression test for a stopped shipper holding an in-flight batch.

Testing

  • Targeted regression test with Maven: 1 test passed, 0 failures, 0 errors, 0 skipped.
  • Apache RAT check over the reactor: passed with 0 unapproved and 0 unknown files.
  • git diff --check: passed.

Compatibility

  • Public API impact: none
  • Configuration impact: none
  • Persisted format impact: none
  • Wire format impact: none

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