Repository navigation
3.35.1
Durable Workflow Server 3.35.1.
| Git tag | 3.35.1 → bee30f97fa8ccf6a808ec0d1435d29f538e530be |
| Image index | sha256:3803f4807b3028b7d935a9155c0b1b516ada210affc09a416b2bb7f82df036b4 in durableworkflow/server and ghcr.io/durable-workflow/server |
| Release run | https://github.com/durable-workflow/server/actions/runs/47231561601 |
Durable Workflow Server 3.35.1 (native)
MySQL logical backups restore again
A mysqldump of a Native MySQL database can now be restored. Earlier
releases could produce dumps that failed with ERROR 1064 (42000) near */
at the first dw_child_summary_* trigger (dw_child_summary_call_insert with
the default table order). Every MySQL database that a release from 3.22.0
through 3.35.0 bootstrapped was affected. MariaDB stores the
same triggers without the problem and was unaffected.
Server #1514
The bootstrap sent the checkpoint triggers to MySQL as one multi-statement
batch. In that case MySQL keeps each trigger body's closing ;, except for
the last one. mysqldump places a trigger body inside a version comment. When
the dump is restored, that ; ends the statement before the comment closes.
Native now creates each trigger and the catalog function in a separate
statement without a terminator.
The triggers still work as stored, so 3.35.1 starts on an existing database
unchanged. When it finds terminated trigger bodies, it logs a
native_checkpoint_triggers_need_repair warning. To make the database's
dumps restorable, run schema-upgrade once with the 3.35.1 image:
- Stop every Native node that shares the database.
- Run
schema-upgrade. It recreates each affected trigger without the
stored trailing;and logsnative_checkpoint_triggers_repaired. - Start the nodes.
schema-upgrade refuses with native_schema_in_use while any other session
uses the database. It replaces each trigger through a temporary shadow trigger,
so every write to a watched table still updates its checkpoint, even if the
command is interrupted. Until it finishes, every node refuses to start:
native_schema_catalog_mismatchwhile a shadow trigger exists, that is,
partway through replacing a trigger;native_schema_upgrade_incompleteat any other point.
If it is interrupted, keep the nodes stopped and run it again. The repair
removes only the stored trailing ;. Each trigger's logic, definer and firing
order stay the same, as do tables, rows, the schema version and checksums. On a binlogged
server, the account needs the
checkpoint privileges.
Upgrading from an earlier schema with schema-upgrade makes the same repair
when no other session is connected.
This release uses the 3.35.0 database schema: MySQL 24, MariaDB 23,
PostgreSQL 22 and SQLite 21. Replacing the image applies it. The 3.35.0 image
still opens a repaired database, so rolling back to 3.35.0 requires no restore.
Back up and restore Native MySQL
Dump with --routines. Without it, the dump omits the checkpoint catalog
function, and restoring the view that reads it fails with ERROR 1305.
Native MySQL logical backups
mysqldump --single-transaction --quick --hex-blob --no-tablespaces --routines \
--set-gtid-purged=OFF "$DB_DATABASE" > native-backup.sqlRestore a backup taken before 3.35.1
A dump taken before this repair still contains terminated
trigger bodies. Filter such a dump before importing it. The filter changes
only the checkpoint trigger lines that end ; */;;.
sed -E '/^\/\*!50003 CREATE\*\/ .*\*\/ \/\*!50003 TRIGGER `dw_child_summary_/s/;[[:space:]]*\*\/;;$/ *\/;;/' \
native-backup.sql > native-backup.portable.sql
mysql --binary-mode "$DB_DATABASE" < native-backup.portable.sqlIf that dump was taken without --routines, the import stops at the view
with ERROR 1305. Recover the catalog function from the backup's own release:
- Bootstrap that release's image, as the application account, into an empty
scratch database withschema-bootstrap. - Run
mysqldump --routines --no-data --no-create-info --skip-triggerson
the scratch database. Apply itsCREATE FUNCTION dw_child_summary_catalog
to the restored database as an administrator. Keep the application
account as definer. - Re-run the
CREATE VIEW dw_child_summary_catalogstatement from the
dump'sFinal view structuresection.
Then run schema-check with the release you will start. That release must
be the backup's own release, or 3.35.1 for a 3.35.0 backup.
To roll back a 3.35.0 upgrade from a pre-upgrade backup:
- Stop every node.
- Restore the filtered pre-upgrade dump and the matching external payload
copy. - Start the previous image. It accepts the restored triggers.