[
https://issues.apache.org/jira/browse/HBASE-30397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
huginn updated HBASE-30397:
---------------------------
Description:
ReplicationSourceShipper.clearWALEntryBatch logs an incomplete warning when it
is interrupted while waiting for the shipper and reader threads to stop.
When the wait in clearWALEntryBatch is interrupted during replication source
shutdown or termination, the InterruptedException is passed as the final
Throwable argument even though the message contains three placeholders. SLF4J
treats a final Throwable specially, so only the peer ID and thread name are
substituted and the last placeholder remains unresolved.
was:
What happens
When ReplicationSourceShipper.clearWALEntryBatch is interrupted while waiting
for the shipper and reader threads to stop, the warning log contains an extra
unresolved placeholder in the message.
When it happens
During replication source shutdown or termination, if the wait in
clearWALEntryBatch is interrupted before both threads stop.
Impact
The replication cleanup behavior is unchanged, but the incomplete warning makes
the log harder to read and obscures the intended shutdown context.
Root cause
In
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java,
the InterruptedException branch uses a message with three placeholders but
passes the exception as the final Throwable argument. SLF4J treats a final
Throwable specially and excludes it from placeholder substitution, so only the
peer ID and thread name fill placeholders.
Proposed fix
Remove the final placeholder and keep the InterruptedException as the final
Throwable argument. This makes the two placeholders match the peer ID and
thread name while preserving the full exception stack trace.
Reproduction
Trigger an interruption while clearWALEntryBatch is waiting for the shipper and
reader threads to stop, then inspect the warning log. Validation is limited to
source review and logging behavior; no unit test is included for this
logging-only change.
> Correct interrupted log message in ReplicationSourceShipper.clearWALEntryBatch
> ------------------------------------------------------------------------------
>
> Key: HBASE-30397
> URL: https://issues.apache.org/jira/browse/HBASE-30397
> Project: HBase
> Issue Type: Bug
> Reporter: huginn
> Priority: Major
> Labels: pull-request-available
>
> ReplicationSourceShipper.clearWALEntryBatch logs an incomplete warning when
> it is interrupted while waiting for the shipper and reader threads to stop.
> When the wait in clearWALEntryBatch is interrupted during replication source
> shutdown or termination, the InterruptedException is passed as the final
> Throwable argument even though the message contains three placeholders. SLF4J
> treats a final Throwable specially, so only the peer ID and thread name are
> substituted and the last placeholder remains unresolved.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)