Files
document-haness/docs/clean-architecture-backend-template/tech-log-studio/result-and-failure-algebra/concept/concept-messaging-transport-spi-c07.md
T
DongHyeonkaandClaude Opus 5 b2963105a8 docs(keycloak-session-store): import the session-storage lab as a new project
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>
2026-09-04 22:51:59 +09:00

55 lines
2.8 KiB
Markdown

---
kind: CONCEPT
slug: messaging-transport-spi-c07
title: 오래 돌 때만 드러나는 수명주기 결함 네 개
topic: result-and-failure-algebra
project: clean-architecture-backend-template
status: 게시 전
sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916
rootTreeNode: concept:messaging-transport-spi-c07
evidenceCapturedOn: 2026-09-01
assets:
- key: messaging-transport-spi-c07
file: ../../../final/evidence/rendered/messaging-transport-spi-c07.svg
evidence:
- ../../../final/evidence/raw/messaging-transport-spi-c07.txt
source:
- 원본 분석 절은 analysis/messaging/messaging-transport-spi.md#L579 이다.
module: messaging-transport-spi
---
# 오래 돌 때만 드러나는 수명주기 결함 네 개
코드 주석이 네 결함을 보존한다. 전부 장기 실행에서만 드러나는 종류다 — 세대 회전이 겹칠 때, 닫힌 세대가 목록에 남을 때, 회전 없이 종료할 때, 이중 해제가 계수를 음수로 만들 때.
## 관계
- **멱등 종료를 보장하는 컴포넌트는 종료 이후의 등록도 정의한다**
같은 분석 리프에서 끌어낸 규칙이다.
- **같은 개념의 sentinel은 계층을 넘어 하나로 정한다**
같은 분석 리프에서 끌어낸 규칙이다.
## 본문
<!-- body:start -->
코드 주석이 네 결함을 보존한다. 전부 **장기 실행에서만 드러나는** 종류다.
| 위치 | 이전 상태 | 그것이 만든 실패 |
|---|---|---|
| `Generation.retiredAt` javadoc | 호출자가 넘긴 하나의 `retiredAt`을 전체 draining 목록에 적용 | 드레인 중 회전이 겹치면, 방금 은퇴한 세대를 강제 종료하거나 오래된 세대에 새 마감을 주거나 — 호출자가 우연히 넘긴 타임스탬프에 좌우 |
| `closeExpiredDraining` 주석 | 이미 닫힌 세대가 목록에 잔류 | `drainingCount()`가 끝난 작업을 영원히 보고 |
| `close()` javadoc | 회전이 은퇴시킨 것만 닫음 | 회전 없이 종료한 프로세스가 브로커 연결을 JVM 종료에 맡김 → 미전송 producer 배치 소실, consumer 세션이 그룹을 떠나지 않고 브로커에서 타임아웃 |
| `endWork` javadoc | clamp 없음 | 이중 해제가 계수를 음수로 → 작업이 도는 중에 드레인 완료로 보고 |
## 0번 해제와 2번 해제가 같은 등급인 이유
네 번째와 `LeakTrackingRuntime.closeCount()` javadoc("Closing twice is as much a defect as never closing")이 같은 주제를 반대편에서 말한다 — **해제는 정확히 한 번이어야 하고, 0번도 2번도 결함이다.**
## 이 기록이 다루는 파일 범위
:::evidence key="messaging-transport-spi-c07" alt="코드베이스에서 파일 목록을 만든 출력 13줄. 이 기록이 다루는 범위가 그 목록이다." caption="코드베이스 파일 목록 — 13줄 · exit 0" zoom="true"
:::
<!-- body:end -->