comdb2
comdb2 copied to clipboard
The multi-table schema changes/partition re-engineer to be atomic
The multi-table schema changes (that includes partitions) need a single transactional llmeta entry to save all changes atomicatlly. The block processor for schema changes was revamped and copy&paste code shared with non-DDL transactions was eliminated. The finalize part was consolidated in one function now shared by both block processor runs and resuming schema change code. Old convention of keeping single table schema changes uuid == 0 was eliminated. In the old code, the single table schema changes where finalized by new master, but not the multi-table schema changes. Now the master resumes both types of schema changes. Resuming schema change is done out-of-band, once the proper setup for alters is executed. This will allow enforcing the limit on number of restarted schema changes on resume for large partitions.
NOTE: the old llmeta structures are still present so we can deploy this without breaking the cluster turn. Code will be removed after deployment.