[
https://issues.apache.org/jira/browse/PHOENIX-7786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Himanshu Gwalani updated PHOENIX-7786:
--------------------------------------
Description:
ReplicationLogProcessor.createLogFileReader() checks for empty files in two
places — once before and once after lease recovery. An empty, unclosed file
still triggers an expensive recoverLease() RPC before being identified as empty
and skipped.
Move the empty-file check to the top of the method, before any lease state
inspection, so 0-byte files are skipped unconditionally.
was:
The replay service can get stuck in an infinite loop if there is a persistent
issue while processing older files in the in-progress directory.
{code:java}
files = replicationLogTracker.getOlderInProgressFiles(oldestTimestampToProcess);
while (!files.isEmpty()) {
processOneRandomFile(files);
files =
replicationLogTracker.getOlderInProgressFiles(oldestTimestampToProcess);
} {code}
> ReplicationLogProcessor: Skip empty replication log files before lease
> recovery
> -------------------------------------------------------------------------------
>
> Key: PHOENIX-7786
> URL: https://issues.apache.org/jira/browse/PHOENIX-7786
> Project: Phoenix
> Issue Type: Sub-task
> Reporter: Himanshu Gwalani
> Assignee: Himanshu Gwalani
> Priority: Major
>
> ReplicationLogProcessor.createLogFileReader() checks for empty files in two
> places — once before and once after lease recovery. An empty, unclosed file
> still triggers an expensive recoverLease() RPC before being identified as
> empty and skipped.
> Move the empty-file check to the top of the method, before any lease state
> inspection, so 0-byte files are skipped unconditionally.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)