revise April 2024 data migration articles
Build and deploy / deploy (push) Successful in 14s

This commit is contained in:
2026-07-31 15:46:48 +03:00
parent a93936ecbf
commit b28d2c14cf
7 changed files with 1044 additions and 1 deletions
@@ -0,0 +1,46 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="820" viewBox="0 0 1200 820" role="img" aria-labelledby="title desc">
<title id="title">Expand, migrate, switch and contract timeline</title>
<desc id="desc">Four-stage timeline for a safe data migration. The old representation remains through expand, migrate and switch. Contract happens only after compatibility evidence and an explicit recovery boundary.</desc>
<rect width="1200" height="820" fill="#f7fafc"/>
<rect x="48" y="42" width="1104" height="112" rx="22" fill="#102a43"/>
<text x="82" y="90" fill="#ffffff" font-family="Arial, sans-serif" font-size="32" font-weight="700">Миграция: старая форма живёт до contract</text>
<text x="82" y="128" fill="#cbd5e1" font-family="Arial, sans-serif" font-size="22">Expand → migrate → switch → contract: удалить старое можно только после отдельного evidence</text>
<line x1="146" y1="350" x2="1054" y2="350" stroke="#486581" stroke-width="8" stroke-linecap="round"/>
<path d="M1054 350 L1018 330 L1018 370 Z" fill="#486581"/>
<circle cx="190" cy="350" r="48" fill="#2f855a"/>
<circle cx="455" cy="350" r="48" fill="#2f855a"/>
<circle cx="720" cy="350" r="48" fill="#d69e2e"/>
<circle cx="985" cy="350" r="48" fill="#b83280"/>
<text x="165" y="360" fill="#ffffff" font-family="Arial, sans-serif" font-size="26" font-weight="700">1</text>
<text x="430" y="360" fill="#ffffff" font-family="Arial, sans-serif" font-size="26" font-weight="700">2</text>
<text x="695" y="360" fill="#ffffff" font-family="Arial, sans-serif" font-size="26" font-weight="700">3</text>
<text x="960" y="360" fill="#ffffff" font-family="Arial, sans-serif" font-size="26" font-weight="700">4</text>
<rect x="72" y="196" width="236" height="104" rx="18" fill="#e6fffa" stroke="#2f855a" stroke-width="3"/>
<text x="96" y="236" fill="#1a202c" font-family="Arial, sans-serif" font-size="28" font-weight="700">Expand</text>
<text x="96" y="270" fill="#334e68" font-family="Arial, sans-serif" font-size="21">Добавить new shape</text>
<text x="96" y="294" fill="#334e68" font-family="Arial, sans-serif" font-size="21">не ломая old writer</text>
<rect x="337" y="196" width="236" height="104" rx="18" fill="#e6fffa" stroke="#2f855a" stroke-width="3"/>
<text x="361" y="236" fill="#1a202c" font-family="Arial, sans-serif" font-size="28" font-weight="700">Migrate</text>
<text x="361" y="270" fill="#334e68" font-family="Arial, sans-serif" font-size="21">Bounded backfill</text>
<text x="361" y="294" fill="#334e68" font-family="Arial, sans-serif" font-size="21">и stop condition</text>
<rect x="602" y="196" width="236" height="104" rx="18" fill="#fffbeb" stroke="#d69e2e" stroke-width="3"/>
<text x="626" y="236" fill="#1a202c" font-family="Arial, sans-serif" font-size="28" font-weight="700">Switch</text>
<text x="626" y="270" fill="#334e68" font-family="Arial, sans-serif" font-size="21">Reader меняется</text>
<text x="626" y="294" fill="#334e68" font-family="Arial, sans-serif" font-size="21">по evidence</text>
<rect x="867" y="196" width="236" height="104" rx="18" fill="#fff5f7" stroke="#b83280" stroke-width="3"/>
<text x="891" y="236" fill="#1a202c" font-family="Arial, sans-serif" font-size="28" font-weight="700">Contract</text>
<text x="891" y="270" fill="#334e68" font-family="Arial, sans-serif" font-size="21">Удалить old path</text>
<text x="891" y="294" fill="#334e68" font-family="Arial, sans-serif" font-size="21">только отдельно</text>
<rect x="80" y="430" width="758" height="130" rx="18" fill="#ffffff" stroke="#829ab1" stroke-width="3"/>
<text x="108" y="474" fill="#102a43" font-family="Arial, sans-serif" font-size="27" font-weight="700">Совместимый период</text>
<text x="108" y="512" fill="#334e68" font-family="Arial, sans-serif" font-size="23">old reader/writer и new reader/writer имеют объявленную форму данных</text>
<text x="108" y="542" fill="#334e68" font-family="Arial, sans-serif" font-size="23">старое представление сохраняется, пока есть declared old consumer</text>
<rect x="872" y="430" width="248" height="130" rx="18" fill="#fff5f7" stroke="#b83280" stroke-width="3"/>
<text x="900" y="474" fill="#7a2846" font-family="Arial, sans-serif" font-size="25" font-weight="700">Не rollback</text>
<text x="900" y="510" fill="#7a2846" font-family="Arial, sans-serif" font-size="20">Удалённые данные</text>
<text x="900" y="536" fill="#7a2846" font-family="Arial, sans-serif" font-size="20">не вернёт binary</text>
<path d="M720 604 C720 688 520 688 520 626" fill="none" stroke="#2f855a" stroke-width="6" stroke-linecap="round"/>
<path d="M520 626 L540 652 L504 650 Z" fill="#2f855a"/>
<text x="252" y="714" fill="#1f7a4d" font-family="Arial, sans-serif" font-size="24" font-weight="700">До contract можно вернуться к совместимому code path</text>
<text x="92" y="774" fill="#486581" font-family="Arial, sans-serif" font-size="20">Это схема решений, не SQL-план и не обещание поведения конкретной СУБД.</text>
</svg>

After

Width:  |  Height:  |  Size: 5.2 KiB

@@ -0,0 +1,34 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="820" viewBox="0 0 1200 820" role="img" aria-labelledby="title desc">
<title id="title">Rehearsal gate for a data migration</title>
<desc id="desc">A gate asks for a declared version mix, data shape, bounded backfill with a stop signal, and a rollback draft. Any missing item leads to stop and review rather than contract.</desc>
<rect width="1200" height="820" fill="#f7fafc"/>
<rect x="48" y="42" width="1104" height="106" rx="22" fill="#102a43"/>
<text x="82" y="90" fill="#ffffff" font-family="Arial, sans-serif" font-size="32" font-weight="700">Rehearsal gate: сначала условия, затем проверка маршрута</text>
<text x="82" y="124" fill="#cbd5e1" font-family="Arial, sans-serif" font-size="22">Он не исполняет migration и не измеряет production; он не даёт пропустить неизвестность</text>
<rect x="80" y="206" width="312" height="114" rx="18" fill="#e6fffa" stroke="#2f855a" stroke-width="3"/>
<text x="108" y="249" fill="#102a43" font-family="Arial, sans-serif" font-size="26" font-weight="700">1. Version mix</text>
<text x="108" y="283" fill="#334e68" font-family="Arial, sans-serif" font-size="21">old/new reader и writer</text>
<text x="108" y="307" fill="#334e68" font-family="Arial, sans-serif" font-size="21">явно объявлены</text>
<rect x="444" y="206" width="312" height="114" rx="18" fill="#e6fffa" stroke="#2f855a" stroke-width="3"/>
<text x="472" y="249" fill="#102a43" font-family="Arial, sans-serif" font-size="26" font-weight="700">2. Data shape</text>
<text x="472" y="283" fill="#334e68" font-family="Arial, sans-serif" font-size="21">old/new form и fallback</text>
<text x="472" y="307" fill="#334e68" font-family="Arial, sans-serif" font-size="21">имеют смысл</text>
<rect x="808" y="206" width="312" height="114" rx="18" fill="#e6fffa" stroke="#2f855a" stroke-width="3"/>
<text x="836" y="249" fill="#102a43" font-family="Arial, sans-serif" font-size="26" font-weight="700">3. Backfill</text>
<text x="836" y="283" fill="#334e68" font-family="Arial, sans-serif" font-size="21">bounded work и signal</text>
<text x="836" y="307" fill="#334e68" font-family="Arial, sans-serif" font-size="21">для остановки</text>
<path d="M236 350 L600 440 L964 350 L600 592 Z" fill="#fffbea" stroke="#d69e2e" stroke-width="4"/>
<text x="515" y="456" fill="#5f370e" font-family="Arial, sans-serif" font-size="29" font-weight="700">Есть rollback draft?</text>
<text x="468" y="493" fill="#7c5a16" font-family="Arial, sans-serif" font-size="22">что обратимо и кто решает stop</text>
<path d="M600 592 L600 670" stroke="#2f855a" stroke-width="7" stroke-linecap="round"/>
<path d="M600 670 L579 642 L621 642 Z" fill="#2f855a"/>
<rect x="402" y="686" width="396" height="76" rx="17" fill="#e6fffa" stroke="#2f855a" stroke-width="3"/>
<text x="433" y="732" fill="#1f7a4d" font-family="Arial, sans-serif" font-size="25" font-weight="700">Human rehearsal question ready</text>
<path d="M410 462 L210 462 L210 588" fill="none" stroke="#b83280" stroke-width="7" stroke-linecap="round"/>
<path d="M210 588 L190 560 L230 560 Z" fill="#b83280"/>
<rect x="72" y="608" width="276" height="112" rx="18" fill="#fff5f7" stroke="#b83280" stroke-width="3"/>
<text x="100" y="651" fill="#7a2846" font-family="Arial, sans-serif" font-size="27" font-weight="700">STOP + review</text>
<text x="100" y="685" fill="#7a2846" font-family="Arial, sans-serif" font-size="20">missing condition</text>
<text x="100" y="709" fill="#7a2846" font-family="Arial, sans-serif" font-size="20">не ведёт к contract</text>
<text x="74" y="792" fill="#486581" font-family="Arial, sans-serif" font-size="20">Gate — список условий в учебной модели; он не запускает БД, SQL, CI, измерения или production rollout.</text>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

@@ -0,0 +1,41 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="820" viewBox="0 0 1200 820" role="img" aria-labelledby="title desc">
<title id="title">Version compatibility matrix for a data migration</title>
<desc id="desc">A matrix compares v1, transition v2 and v3 readers and writers against old and new data representations. The red case highlights removing the old representation while v1 is still declared.</desc>
<rect width="1200" height="820" fill="#f7fafc"/>
<rect x="48" y="42" width="1104" height="104" rx="22" fill="#102a43"/>
<text x="82" y="88" fill="#ffffff" font-family="Arial, sans-serif" font-size="32" font-weight="700">Совместимость: reader и writer во времени</text>
<text x="82" y="123" fill="#cbd5e1" font-family="Arial, sans-serif" font-size="22">Не «схема развернулась», а какая версия читает и пишет old/new representation</text>
<rect x="64" y="192" width="266" height="72" fill="#243b53"/>
<rect x="330" y="192" width="255" height="72" fill="#243b53"/>
<rect x="585" y="192" width="255" height="72" fill="#243b53"/>
<rect x="840" y="192" width="296" height="72" fill="#243b53"/>
<text x="94" y="238" fill="#ffffff" font-family="Arial, sans-serif" font-size="25" font-weight="700">Версия</text>
<text x="366" y="238" fill="#ffffff" font-family="Arial, sans-serif" font-size="25" font-weight="700">Reader</text>
<text x="625" y="238" fill="#ffffff" font-family="Arial, sans-serif" font-size="25" font-weight="700">Writer</text>
<text x="872" y="238" fill="#ffffff" font-family="Arial, sans-serif" font-size="25" font-weight="700">Переходный смысл</text>
<rect x="64" y="264" width="1072" height="116" fill="#e6fffa" stroke="#9fb3c8" stroke-width="2"/>
<text x="94" y="313" fill="#102a43" font-family="Arial, sans-serif" font-size="30" font-weight="700">v1 · old</text>
<text x="94" y="350" fill="#334e68" font-family="Arial, sans-serif" font-size="25">ещё declared</text>
<text x="358" y="320" fill="#102a43" font-family="Arial, sans-serif" font-size="29">читает old</text>
<text x="613" y="320" fill="#102a43" font-family="Arial, sans-serif" font-size="29">пишет old</text>
<text x="870" y="320" fill="#1f7a4d" font-family="Arial, sans-serif" font-size="28" font-weight="700">expand</text>
<text x="870" y="354" fill="#334e68" font-family="Arial, sans-serif" font-size="23">old path остаётся</text>
<rect x="64" y="380" width="1072" height="116" fill="#fffbea" stroke="#9fb3c8" stroke-width="2"/>
<text x="94" y="429" fill="#102a43" font-family="Arial, sans-serif" font-size="30" font-weight="700">v2 · переход</text>
<text x="94" y="466" fill="#334e68" font-family="Arial, sans-serif" font-size="25">mixed fleet</text>
<text x="358" y="436" fill="#102a43" font-family="Arial, sans-serif" font-size="29">old / new</text>
<text x="613" y="436" fill="#102a43" font-family="Arial, sans-serif" font-size="29">old / new</text>
<text x="870" y="436" fill="#9c6500" font-family="Arial, sans-serif" font-size="28" font-weight="700">migrate</text>
<text x="870" y="470" fill="#334e68" font-family="Arial, sans-serif" font-size="23">stop gate</text>
<rect x="64" y="496" width="1072" height="116" fill="#edf2f7" stroke="#9fb3c8" stroke-width="2"/>
<text x="94" y="545" fill="#102a43" font-family="Arial, sans-serif" font-size="30" font-weight="700">v3 · new</text>
<text x="94" y="582" fill="#334e68" font-family="Arial, sans-serif" font-size="25">после contract</text>
<text x="358" y="552" fill="#102a43" font-family="Arial, sans-serif" font-size="29">читает new</text>
<text x="613" y="552" fill="#102a43" font-family="Arial, sans-serif" font-size="29">пишет new</text>
<text x="870" y="552" fill="#1f7a4d" font-family="Arial, sans-serif" font-size="28" font-weight="700">contract</text>
<text x="870" y="586" fill="#334e68" font-family="Arial, sans-serif" font-size="23">после evidence</text>
<rect x="64" y="642" width="1072" height="96" rx="16" fill="#fff5f7" stroke="#b83280" stroke-width="3"/>
<text x="94" y="682" fill="#7a2846" font-family="Arial, sans-serif" font-size="25" font-weight="700">Стоп: old representation нельзя удалить, пока v1 всё ещё declared.</text>
<text x="94" y="716" fill="#7a2846" font-family="Arial, sans-serif" font-size="21">Green deployment нового кода не доказывает отсутствие old reader или old writer.</text>
<text x="66" y="782" fill="#486581" font-family="Arial, sans-serif" font-size="20">Матрица — проектный контракт, а не inventory реального кластера и не измерение нагрузки.</text>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB