The keycloak project ended with four open questions that design could not
settle. A two-VM lab was built to answer them by measurement, and this is
that material: 26 experiments, 125 raw command outputs, 22 browser captures.
Follows the import procedure in README.md.
source/ the originating repository verbatim — 78 documents, 28 SVGs,
8 manifests, plus .source-revision recording the commit
final/ the SSOT
document.md 729 lines written from the 29 experiment documents, not
concatenated: what was predicted, what was measured, and
where the measurement itself was wrong
evidence/raw 125 outputs, flattened to <experiment>__<file> because
the originals collided (01-baseline.txt appeared three
times) and the audit only globs the top level
evidence/meta one per raw file; command and exitCode are null and the
README says why rather than inventing them
evidence/browser 22 captures
assets/ three diagrams through techviz
.techviz/ their VizSpecs
A separate project rather than an addition to keycloak: the B-layer answers
that project's four questions, but the A, C and D layers are about cluster
failure, SSO and operations, and one document.md should hold one subject.
The four question records there can point here through 관계.
Recorded rather than papered over: only three of the 28 diagrams were
remade. The repository forbids hand-drawn SVG and forbids titles inside the
canvas; all 28 originals carry both, so converting them is redrawing, not
reformatting. They stay in source/ and the gap is written into the document.
verify-pipeline.py passes. audit-records.py reports no issues.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
41 lines
2.1 KiB
Markdown
41 lines
2.1 KiB
Markdown
---
|
|
kind: CONCEPT
|
|
slug: adapter-outbound-persistence-jpa-c14
|
|
title: SQLSTATE가 retryable이라고 해서 use case를 다시 돌리지 않는다
|
|
topic: transaction-and-consistency-models
|
|
project: clean-architecture-backend-template
|
|
status: 게시 전
|
|
sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916
|
|
rootTreeNode: concept:adapter-outbound-persistence-jpa-c14
|
|
evidenceCapturedOn: 2026-09-01
|
|
assets:
|
|
- key: adapter-outbound-persistence-jpa-c14
|
|
file: ../../../final/evidence/rendered/adapter-outbound-persistence-jpa-c14.svg
|
|
evidence:
|
|
- ../../../final/evidence/raw/adapter-outbound-persistence-jpa-c14.txt
|
|
source:
|
|
- 원본 분석 절은 analysis/05-adapter-outbound-persistence-jpa.md#L938 이다.
|
|
module: adapter-outbound-persistence-jpa
|
|
---
|
|
|
|
# SQLSTATE가 retryable이라고 해서 use case를 다시 돌리지 않는다
|
|
|
|
`TransactionRetryClassifier`의 automatic replay candidate는 `40001`과 `40P01` 둘뿐이고, 그것만으로는 재시도하지 않는다. 업무 side-effect가 replay-safe하다고 application policy가 선언해야 한다.
|
|
|
|
## 본문
|
|
|
|
<!-- body:start -->
|
|
|
|
`TransactionRetryClassifier`는 cause chain에서 SQLSTATE를 찾지만 automatic replay candidate는 `40001`과 `40P01` 둘뿐이다. `08007` 같은 transaction-resolution-unknown은 candidate가 아니다.
|
|
|
|
## TransactionRetryClassifier 참조 위치
|
|
|
|
:::evidence key="adapter-outbound-persistence-jpa-c14" alt="코드베이스에서 TransactionRetryClassifier 를 검색한 출력 11줄. 이 기록이 세는 참조가 그 출력에 그대로 보인다." caption="TransactionRetryClassifier 코드베이스 검색 — 11줄 · exit 0" zoom="true"
|
|
:::
|
|
|
|
## 분류만으로는 재시도하지 않는다
|
|
|
|
`SpringPolicyTransactionPort`는 ordinary command에서 40001이 나더라도 `COMMAND_SERIALIZABLE_REPLAY_SAFE`가 아니면 retry하지 않는다. failure 종류뿐 아니라 **업무 side-effect가 replay-safe하다고 application policy가 선언했는가**가 함께 필요하다. 이것은 "DB가 retryable이라고 말하니 use case를 다시 실행"하는 구조와 다르다.
|
|
|
|
<!-- body:end -->
|