92 lines
5.4 KiB
XML
92 lines
5.4 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 1620" role="img" aria-labelledby="title desc">
|
||
<title id="title">Диагностика позднего владельца lease</title>
|
||
<desc id="desc">Вертикальное дерево разбора поздней записи. Сначала собираются resource key и fencing token, затем различаются устаревшее поколение, повтор операции, ресурс без fencing и неверный release.</desc>
|
||
<defs>
|
||
<marker id="arrow" viewBox="0 0 12 12" refX="10" refY="6" markerWidth="10" markerHeight="10" orient="auto-start-reverse">
|
||
<path d="M1 1 L11 6 L1 11z" fill="#9fb7d7"/>
|
||
</marker>
|
||
<style>
|
||
.bg { fill: #0b1324; }
|
||
.card { fill: #14213a; stroke: #42658f; stroke-width: 3; }
|
||
.decision { fill: #173e45; stroke: #48c5be; stroke-width: 3; }
|
||
.ok { fill: #1a4136; stroke: #67d5a6; stroke-width: 3; }
|
||
.warn { fill: #422a30; stroke: #ff9a80; stroke-width: 3; }
|
||
.line { stroke: #9fb7d7; stroke-width: 5; fill: none; marker-end: url(#arrow); }
|
||
.branch { stroke: #ffb270; stroke-width: 5; fill: none; marker-end: url(#arrow); }
|
||
.title { fill: #ffffff; font: 700 34px Arial, sans-serif; }
|
||
.label { fill: #eaf2ff; font: 600 27px Arial, sans-serif; }
|
||
.body { fill: #d2def2; font: 24px Arial, sans-serif; }
|
||
.small { fill: #b6c7e3; font: 22px Arial, sans-serif; }
|
||
.tag { fill: #87e5db; font: 700 21px Arial, sans-serif; letter-spacing: 1px; }
|
||
.yes { fill: #93e5ba; font: 700 22px Arial, sans-serif; }
|
||
.no { fill: #ffcb99; font: 700 22px Arial, sans-serif; }
|
||
</style>
|
||
</defs>
|
||
<rect class="bg" width="720" height="1620" rx="32"/>
|
||
<text x="360" y="62" text-anchor="middle" class="title">Разбор поздней записи</text>
|
||
<text x="360" y="96" text-anchor="middle" class="small">сначала факт ресурса, затем причина</text>
|
||
|
||
<rect x="80" y="140" width="560" height="160" rx="22" class="card"/>
|
||
<text x="115" y="183" class="tag">1 · СОБРАТЬ EVIDENCE</text>
|
||
<text x="115" y="225" class="label">resource key · leaseId · token</text>
|
||
<text x="115" y="258" class="body">highest token до и после write</text>
|
||
<path d="M360 300 L360 352" class="line"/>
|
||
|
||
<rect x="80" y="352" width="560" height="156" rx="22" class="decision"/>
|
||
<text x="115" y="394" class="tag">2 · СРАВНИТЬ</text>
|
||
<text x="115" y="436" class="label">token меньше highest token?</text>
|
||
<text x="115" y="469" class="body">это один и тот же resource key?</text>
|
||
|
||
<path d="M222 508 L222 565" class="line"/>
|
||
<path d="M498 508 L498 565" class="branch"/>
|
||
<text x="166" y="550" class="yes">ДА</text>
|
||
<text x="470" y="550" class="no">НЕТ</text>
|
||
|
||
<rect x="52" y="585" width="340" height="188" rx="22" class="ok"/>
|
||
<text x="82" y="626" class="tag">STALE GENERATION</text>
|
||
<text x="82" y="668" class="label">resource уже принял</text>
|
||
<text x="82" y="701" class="body">более новый token</text>
|
||
<text x="82" y="734" class="small">reject stale write; не retry</text>
|
||
|
||
<rect x="428" y="585" width="240" height="188" rx="22" class="decision"/>
|
||
<text x="458" y="626" class="tag">ДАЛЬШЕ</text>
|
||
<text x="458" y="668" class="label">проверить</text>
|
||
<text x="458" y="701" class="body">operationId</text>
|
||
<text x="458" y="734" class="small">и оба write</text>
|
||
|
||
<path d="M548 773 L548 830" class="branch"/>
|
||
<rect x="428" y="850" width="240" height="176" rx="22" class="card"/>
|
||
<text x="458" y="891" class="tag">DUPLICATE?</text>
|
||
<text x="458" y="933" class="label">тот же effect</text>
|
||
<text x="458" y="966" class="body">с тем же id?</text>
|
||
<text x="458" y="999" class="small">да → ledger policy</text>
|
||
|
||
<path d="M548 1026 L548 1083" class="branch"/>
|
||
<rect x="428" y="1103" width="240" height="176" rx="22" class="warn"/>
|
||
<text x="458" y="1144" class="tag">BOTH ACCEPTED</text>
|
||
<text x="458" y="1186" class="label">ресурс пишет</text>
|
||
<text x="458" y="1219" class="body">без compare</text>
|
||
<text x="548" y="1252" text-anchor="middle" class="small">atomic compare + fence</text>
|
||
|
||
<path d="M222 773 L222 830" class="line"/>
|
||
<rect x="52" y="850" width="340" height="176" rx="22" class="card"/>
|
||
<text x="82" y="891" class="tag">RELEASE CHECK</text>
|
||
<text x="82" y="933" class="label">старый handle снимает</text>
|
||
<text x="82" y="966" class="body">lease нового worker?</text>
|
||
<text x="82" y="999" class="small">сверить exact lease handle</text>
|
||
|
||
<path d="M222 1026 L222 1083" class="line"/>
|
||
<rect x="52" y="1103" width="340" height="176" rx="22" class="decision"/>
|
||
<text x="82" y="1144" class="tag">SCOPE CHECK</text>
|
||
<text x="82" y="1186" class="label">один lockName, но</text>
|
||
<text x="82" y="1219" class="body">разные resource key?</text>
|
||
<text x="82" y="1252" class="small">пересмотреть границу token</text>
|
||
|
||
<path d="M360 1279 L360 1336" class="line"/>
|
||
<rect x="80" y="1356" width="560" height="172" rx="22" class="ok"/>
|
||
<text x="115" y="1397" class="tag">ИТОГ</text>
|
||
<text x="115" y="1439" class="label">Назвать конкретный stale result</text>
|
||
<text x="115" y="1472" class="label">и следующий test</text>
|
||
<text x="115" y="1505" class="small">Lock log без resource evidence не является гарантией.</text>
|
||
</svg>
|