Commit 5a06ffa
authored
[db_metadata] Parse schema on migration, await backfill (#9878)
Non-atomic schema changes ARE real and CAN hurt you
- Adds CRDB-specific preprocessing and `sqlparser` parsing to each
schema change within Nexus
- Verifies that each change contains "at most one" schema-modifying DDL
statement
- Adds a secondary transaction to each "apply schema change" step, which
verifies that the underlying backfill operation has completed. The
objective here is to transform "delayed, async DDL statements" into
synchronous operations, so we can know "it succeeded fully" or "it
failed" before moving on
Part of #9866
Fixes #98881 parent ccede3c commit 5a06ffa
254 files changed
Lines changed: 3097 additions & 4 deletions
File tree
- .claude/skills/crdb-change
- nexus
- db-model
- src
- db-queries/src/db/datastore
- tests/integration_tests
- schema/crdb
- 11.0.0
- 12.0.0
- 13.0.0
- 14.0.0
- 18.0.0
- 19.0.0
- 23.0.0
- 26.0.0
- 29.0.0
- 3.0.0
- 3.0.1
- 31.0.0
- 34.0.0
- 40.0.0
- 44.0.0
- 45.0.0
- 5.0.0
- 9.0.0
- add-external-subnets
- add-instance-id-to-migrations
- add-ip-to-external-ip-index
- add-lookup-disk-by-volume-id-index
- add-lookup-sled-by-policy-and-state-index
- add-lookup-vmm-by-sled-id-index
- add-metrics-producers-time-modified-index
- add-migrations-by-time-created-index
- add-trust-quorum
- add-view-for-bgp-peer-configs
- add-view-for-v2p-mappings
- affinity
- alerts-renamening
- allocate-subnet-decommissioned-sleds
- audit-log
- bgp-unnumbered-peers
- blueprint-disposition-expunged-cleanup
- blueprint-physical-disk
- blueprint-zone-image-source
- bp-disk-disposition-expunged-cleanup
- bundle-by-creation
- caboose-sign-value
- clean-misplaced-m2s
- crucible-ref-count-records
- dataset-address-optional
- dataset-kinds-zone-and-debug
- dataset-to-crucible-dataset
- disk-types
- dual-stack-ephemeral-ip
- dual-stack-network-interfaces
- ereports
- fix-session-token-column-order
- fm-cases
- fm-sitreps-by-parent-id-index
- fm-sitrep
- internet-gateway
- inv-clear-mupdate-override
- inventory-omicron-sled-config
- ip-pool-range-by-pool-id-index
- local-storage-dataset
- local-storage-disk-type
- local-storage-unencrypted-dataset
- lookup-bgp-config-by-asn
- lookup-bgp-config-indexes
- lookup-instances-by-state-index
- lookup-region-snapshot-by-region-id
- lookup-region-snapshot-by-snapshot-id
- measurements
- multicast-group-support
- multicast-implicit-lifecycle
- multicast-pool-support
- multiple-default-ip-pools-per-silo
- nexus-generation
- nexus-lockstep-port
- no-default-pool-for-internal-silo
- one-big-ereport-table
- oximeter-add-time-expunged
- populate-db-metadata-nexus
- positive-quotas
- region-port
- region-replacement
- rendezvous-debug-dataset
- scim-actor-audit-log
- scim-client-bearer-token
- scim-users-and-groups
- separate-instance-and-vmm-states
- separate-transit-ips-by-version
- snapshot-replacement
- support-bundles
- support-read-only-region-replacement
- support-up-to-12-disks
- token-and-session-ids
- tuf-generation
- tuf-pruned-index
- user-data-export
- user-provision-type-for-silo-user-and-group
- vpc-subnet-contention
- webhooks
- zone-image-resolver-inventory
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | 67 | | |
| 68 | + | |
| 69 | + | |
69 | 70 | | |
0 commit comments