This introduces the MigrationType which we can use to specify whether we want to wrap a migration in a transaction and block secondary nodes.
Depends on D13208
Differential D13209
[keyserver] add migration type to migrations will on Aug 29 2024, 12:18 PM. Authored by Tags None Referenced Files
Subscribers
Details
This introduces the MigrationType which we can use to specify whether we want to wrap a migration in a transaction and block secondary nodes. Depends on D13208 Tested later in stack
Diff Detail
Event TimelineComment Actions if a dev is introducing a new migration how will they know which migrationType variant to use? can we instead introduce an optional field in Migration to override the default behavior? Comment Actions We could make wrap_in_transaction_and_block_requests the default behavior. Was wondering if you think this is better suited as a boolean. Originally had this is as string union but liked the explicative naming of these types, allowing us to possibly introduce new migrationTypes later as well (but unsure how likely this is). Comment Actions I think you can keep MigrationType as-is and just change Migration: export type Migration = { +version: number, +migrationPromise: () => Promise<mixed>, +migrationType?: MigrationType, }; then in the logic where you check the migrationType, just treat "wrap in transaction" as the default behavior if the field is missing |