[
https://issues.apache.org/jira/browse/HDDS-16691?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dian-Xuan Yang reassigned HDDS-16691:
-------------------------------------
Assignee: Dian-Xuan Yang
> Retriable snapshot load TIMEOUT reaches clients as an unchecked
> IllegalStateException
> -------------------------------------------------------------------------------------
>
> Key: HDDS-16691
> URL: https://issues.apache.org/jira/browse/HDDS-16691
> Project: Apache Ozone
> Issue Type: Bug
> Reporter: Siyao Meng
> Assignee: Dian-Xuan Yang
> Priority: Major
> Attachments: HDDS-16691-CR-R11-load-timeout-unchecked.patch
>
>
> h3. Mechanism
> {{SnapshotCache.get}} tolerates only {{FILE_NOT_FOUND}} and rewraps every
> other {{OMException}} as {{IllegalStateException}}
> ({{SnapshotCache.java:230-234}}). The loader raises {{OMException(TIMEOUT)}}
> when a snapshot's create transaction has not yet been flushed
> ({{OmSnapshotManager.java:380-383}}), which is the very condition the
> HDDS-13633 poll exists for.
> The wrapping exists because the lambda passed to {{dbMap.compute}} cannot
> throw checked exceptions. {{FILE_NOT_FOUND}} was given an escape hatch and
> {{TIMEOUT}} was not.
> h3. Impact
> A retriable snapshot load TIMEOUT reaches the read request handler as an
> unchecked {{IllegalStateException}} it cannot map, so the client gets an
> unstructured {{RemoteException}} instead of status {{TIMEOUT}} and loses the
> retry hint. Client visible on every occurrence, bounded, and not persistent
> in server state.
> h3. Reproduction
> {{repro/test_bugCR-R11_timeout_becomes_unchecked.sh}}. Evidence in
> {{repro/logs/ev-cr2.log}}.
> h3. Patch
> {{HDDS-XXXXX-CR-R11-load-timeout-unchecked.patch}} is attached. It applies to
> 20e6a1c0f6039248373efd3eb1d7f2afcf7f1535 and carries the fix plus a
> regression test that was verified to fail without the fix and pass with it.
> {code:none}
> mvn test -pl hadoop-ozone/ozone-manager -Dtest=TestSnapshotCache
> {code}
> Found by TLA+ model checking and code review of the OM snapshot cache under
> HDDS-15926, on commit 20e6a1c0f6039248373efd3eb1d7f2afcf7f1535. Generated
> with Specula (Claude Opus 5).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]