Commit b7b216f
docs(cutover): correct verify version-check + finalize crash-recovery comments
Two comment accuracy fixes from a colleague review (JetoPistola).
000005_verify_migration.sql — the version-collapse guard comment claimed it detects legacy
sub-microsecond version-selection on pre-000019 parts. It cannot: ClickHouse coerces
last_updated_at to its DECLARED DateTime64(6) at read time, so raw ns digits are unrecoverable
through the column and uniqExact(last_updated_at) == uniqExact(toDateTime64(last_updated_at,6))
always — collapse_keys is structurally 0 on a (6)-declared schema (empirically confirmed;
inert since #7572). Reword to say it is inert defense-in-depth that can only fire if the
column is ever re-declared at higher precision, and note that dropping the guard +
--allow-version-collapse as dead code is a reasonable follow-up (kept out of scope here).
finalize.sh — the recycle comment said re-running finalize "recovers" a crash between the
ordered TRUNCATE and RENAME. That's only true single-host; under partial ON CLUSTER
propagation the re-run's cluster-wide classify sees a mixed state and refuses loudly (finish
the RENAME by hand), never silently corrupting. Reword to reflect both.
Comment-only; no behavior change.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 2ba13ed commit b7b216f
2 files changed
Lines changed: 14 additions & 10 deletions
File tree
- apps/opik-backend/data-migrations/traces-local-v2-cutover/scripts
- db-app-analytics
Lines changed: 10 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
| |||
0 commit comments