[
https://issues.apache.org/jira/browse/HBASE-30433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HBASE-30433:
-----------------------------------
Labels: pull-request-available (was: )
> Seed the master's flushedSequenceIdByRegion watermark with the region's final
> flushed seqid on region CLOSE
> -----------------------------------------------------------------------------------------------------------
>
> Key: HBASE-30433
> URL: https://issues.apache.org/jira/browse/HBASE-30433
> Project: HBase
> Issue Type: Bug
> Components: proc-v2
> Affects Versions: 3.0.0, 2.6.5, 2.6.7
> Reporter: Nirdosh Kumar Yadav
> Priority: Minor
> Labels: pull-request-available
>
> Summary — HBASE-30335 seeds the master's flushedSequenceIdByRegion watermark
> with openSeqNum at OPEN time so a later WAL split of a drained/crashed source
> RS recognizes already-durable edits instead of writing orphaned
> recovered.edits. This follow-up additionally seeds the same watermark at
> CLOSE time, using the region's final flushed seqid, to tighten a narrow
> window the OPEN-time seed alone doesn't cover.
> Motivation (window flagged by [~Umeshkumar9414] on #8584):
> 1. A region is gracefully closed on the source RS (memstore flushed to the
> close marker).
> 2. The source RS dies before the target RS finishes OPEN — so the OPEN-time
> seed hasn't fired.
> 3. The source RS's SCP splits its WAL in that window, filtering against the
> still-stale watermark, and writes a (harmless-but-present) recovered.edits
> file.
> Seeding on CLOSE advances the watermark to the reported flushed seqid before
> the source RS dies. It's additive, not a replacement: it does nothing for the
> pure-crash / never-gracefully-closed path, so the OPEN-time seed must remain.
> Both writers use the same monotonic merge(Math::max), so they compose safely.
> Proposed change (no proto/RPC change — the RegionStateTransition message
> already carries optional openSeqNum, and CLOSED is already routed through the
> same master handler):
> - RegionServer — CloseRegionHandler / UnassignRegionHandler pass
> HRegion.getMaxFlushedSeqId() instead of NO_SEQNUM;
> HRegionServer.createReportRegionStateTransitionRequest sets the wire
> openSeqNum field for CLOSED too (when >= 0).
> - Master — AssignmentManager CLOSED case seeds via
> serverManager.reportRegionOpen(regionInfo, seqId).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)