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>
This commit is contained in:
co-authored by
Claude Opus 5
parent
43bccd08a8
commit
b2963105a8
+43
@@ -0,0 +1,43 @@
|
||||
import dev.caskeleton.adapter.outbound.persistence.api.PersistenceOperationName;
|
||||
import dev.caskeleton.adapter.outbound.persistence.api.error.JpaFailureContext;
|
||||
import dev.caskeleton.adapter.outbound.persistence.api.error.SerializationFailureException;
|
||||
import dev.caskeleton.adapter.outbound.persistence.api.transaction.*;
|
||||
import dev.caskeleton.adapter.outbound.persistence.transaction.*;
|
||||
import java.time.*;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.springframework.transaction.*;
|
||||
import org.springframework.transaction.support.SimpleTransactionStatus;
|
||||
|
||||
public class JpaCustomRetryPolicyProbe {
|
||||
public static void main(String[] args) {
|
||||
AtomicInteger customPolicyCalls = new AtomicInteger();
|
||||
AtomicInteger workCalls = new AtomicInteger();
|
||||
PlatformTransactionManager tm = new PlatformTransactionManager() {
|
||||
public TransactionStatus getTransaction(TransactionDefinition d) { return new SimpleTransactionStatus(true); }
|
||||
public void commit(TransactionStatus s) {}
|
||||
public void rollback(TransactionStatus s) {}
|
||||
};
|
||||
Clock clock = Clock.fixed(Instant.parse("2026-08-29T00:00:00Z"), ZoneOffset.UTC);
|
||||
SpringJpaTransactionExecutor executor = new SpringJpaTransactionExecutor(tm, clock);
|
||||
JpaRetryPolicy custom = (failure, attempt) -> {
|
||||
customPolicyCalls.incrementAndGet();
|
||||
return RetryDecision.fail("custom-policy-called");
|
||||
};
|
||||
FullTransactionRetryCoordinator coordinator = new FullTransactionRetryCoordinator(
|
||||
executor, custom, ignored -> {}, clock, Duration.ofSeconds(30), RetryEventListener.noop());
|
||||
RetryProfile retry = RetryProfile.boundedContention("probe.write", 2);
|
||||
TransactionProfile profile = TransactionProfile.write("probe.write", Duration.ofSeconds(5)).withRetryProfile(retry);
|
||||
PersistenceOperationName operation = new PersistenceOperationName("probe.write");
|
||||
try {
|
||||
coordinator.execute(operation, profile, () -> {
|
||||
int call = workCalls.incrementAndGet();
|
||||
throw new SerializationFailureException(
|
||||
JpaFailureContext.retryable(operation, "40001", call, Duration.ZERO, null));
|
||||
});
|
||||
} catch (SerializationFailureException expected) {
|
||||
System.out.println("thrown=" + expected.category());
|
||||
}
|
||||
System.out.println("customPolicyCalls=" + customPolicyCalls.get());
|
||||
System.out.println("workCalls=" + workCalls.get());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user