Skip to content

3.35.1

Choose a tag to compare

@github-actions github-actions released this 04 Dec 01:43
· 216 commits to main since this release
Immutable release. Only release title and notes can be modified.
bee30f9

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:

  1. Stop every Native node that shares the database.
  2. Run schema-upgrade. It recreates each affected trigger without the
    stored trailing ; and logs native_checkpoint_triggers_repaired.
  3. 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_mismatch while a shadow trigger exists, that is,
    partway through replacing a trigger;
  • native_schema_upgrade_incomplete at 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.sql

Restore 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.sql

If 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:

  1. Bootstrap that release's image, as the application account, into an empty
    scratch database with schema-bootstrap.
  2. Run mysqldump --routines --no-data --no-create-info --skip-triggers on
    the scratch database. Apply its CREATE FUNCTION dw_child_summary_catalog
    to the restored database as an administrator. Keep the application
    account as definer.
  3. Re-run the CREATE VIEW dw_child_summary_catalog statement from the
    dump's Final view structure section.

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:

  1. Stop every node.
  2. Restore the filtered pre-upgrade dump and the matching external payload
    copy.
  3. Start the previous image. It accepts the restored triggers.