You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Andrew Kyle Purtell (Jira)" <ji...@apache.org> on 2026/10/09 21:19:00 UTC

[jira] [Updated] (PHOENIX-7984) Fence writer on sync failure to prevent false-success RPO loss

     [ https://issues.apache.org/jira/browse/PHOENIX-7984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Kyle Purtell updated PHOENIX-7984:
-----------------------------------------
    Fix Version/s: PHOENIX-7562-feature
                   5.4.0

> Fence writer on sync failure to prevent false-success RPO loss
> --------------------------------------------------------------
>
>                 Key: PHOENIX-7984
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-7984
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Tanuj Khurana
>            Assignee: Tanuj Khurana
>            Priority: Major
>             Fix For: PHOENIX-7562-feature, 5.4.0
>
>
> A block-full or explicit sync() that fails after closeBlock() has already advanced block state leaves the LogFileWriter in a torn-down state. A subsequent retry sync() then finds nothing left to flush and returns success — a false ACK. That false ACK clears currentBatch, silently dropping the unsynced records (RPO loss). The retry succeeds against a writer whose durability barrier was never actually crossed.
> Fix (mirroring HDFS DFSOutputStream single-shot semantics)
>   - LogFileWriter: latch the first append/sync failure. Every subsequent append/sync fails fast rather than re-driving the already torn-down stream, so a fenced writer can never report false success.
>   - ReplicationLog.apply(): a retry is only meaningful on a fresh writer. On failure, request rotation; if no fresh writer can be staged, surface the original failure instead of burning a retry attempt on the fenced writer.
> Recovery remains the higher layer's responsibility: rotate to a fresh writer and replay the unsynced batch. The failing event's own record is recovered via replayFailedEvent.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)