Skip to content

v0.4.0 -- atomic-DDL participation (closes A-5)

Choose a tag to compare

@EvgeniyPatlan EvgeniyPatlan released this 04 Jun 17:50
· 20 commits to main since this release
a64b9cb

v0.4.0 — atomic-DDL participation (closes A-5)

Wires the TidesDB-MySQL plugin into MySQL 9.7's atomic-DDL contract end-to-end. Crash-during-DDL no longer leaves the data dictionary and the column-family list divergent, and engine-private schema metadata is now portable via SDI. The bundled TidesDB engine is unchanged from v0.3.1 (still v9.3.2, still unpatched) — all changes are plugin-side.

Added

  • HTON_SUPPORTS_ATOMIC_DDL flag activated on the handlerton — MySQL now treats TidesDB as a full participant in the DD transaction.
  • 6 SDI tablespace callbacks (sdi_create / sdi_drop / sdi_get_keys / sdi_get / sdi_set / sdi_delete) backed by a dedicated __tidesdb_sdi metadata column family. mysqldump --tab, IMPORT TABLE, and clone can now capture TidesDB engine-private metadata portably.
  • 8 DDSE callback stubs (ddse_dict_init / dict_init / dict_recover / dict_cache_reset / dict_cache_reset_tables_and_tablespaces / dict_get_server_version / dict_set_server_version / is_dict_readonly) — wired for a future "TidesDB hosts the data dictionary" capability; inert in v0.4.0.
  • Single logical tablespace tidesdb_system registered via Plugin_tablespace.
  • prepare_create / validate_open / prepare_drop — persist CF binding (cf_name + SHA-256 schema fingerprint + CRC32 options checksum + atomic_ddl marker + creation epoch) into dd::Table::se_private_data on CREATE; validate on OPEN; clean up SDI on DROP.
  • Inplace ALTER state machine now consumes its dd::Table * parameters; emits updated SDI on commit.
  • DdSyncReconciler — symmetric-difference reconciliation between the DD and the TidesDB CF list (excluding __-prefixed internal CFs), driven via the tidesdb_orphan_action sysvar (drop / quarantine / log_only).
  • 2 new sysvars: tidesdb_atomic_ddl_strict (BOOL, default ON) and tidesdb_orphan_action (ENUM, default quarantine).
  • 21 new MTR tests under the tidesdb_ddl_* prefix + 10 new gtest cases for the pure helpers.

Changed

  • Inplace ALTER virtuals now consume dd::Table * (previously [[maybe_unused]]).
  • ha_tidesdb::rename_table / ha_tidesdb::delete_table flush the engine transaction before MySQL's CF mutations begin (pre-Task-13 ordering preserved at the engine layer).

Fixed

  • COPY-ALTER 2PC SIGSEGV (commit 0d7fe2c). Latent heap-use-after-free inside the TidesDB C library (tidesdb_iter_release_sst_source_block) — exposed only after the HTON flag activation changed MySQL's commit ordering. Tactical fix flushes the engine txn at the top of rename_table and delete_table; long-term fix (SE-private DDL journal) deferred to v0.5.0.

Upgrade notes

  • Pre-v0.4.0 tables don't auto-emit SDI on open. To upgrade: run ALTER TABLE t ENGINE=TIDESDB (no-op ALTER) to populate se_private_data + emit SDI.
  • Default tidesdb_atomic_ddl_strict=ON rejects tables whose se_private_data is missing the atomic-DDL keys. Set OFF temporarily during the upgrade window.

Validation

Full validation matrix green — see docs/v0.4.0-validation-report.md:

  • MTR: 68 PASS / 0 FAIL / 15 SKIPPED
  • gtest: 10/10 PASS (SdiPackKey 3/3 + ReconcilerDelta 7/7)
  • mwbench 1 GiB integrity: PASS (290 MiB/s, 0 corruption, 0 misses)
  • HammerDB SMOKE + WARE=10: PASS, 0 handler errors
  • SIGKILL crash-recovery: PASS (WAL durably recovered)
  • v0.3.1 vs v0.4.0 head-to-head HammerDB: within single-iteration noise

Artifact

  • perconalab/tidesdb-mysql:0.4.0 — digest sha256:6fcfc8ebf142c4a078185ef1b3cdf8ba7d28b3132d3a0e554926a88c457ce04c
  • Plugin .so SHA-256: af149b16afebe45c96c3a5d6b4451a44fcfec596c4a9d8434f03fc0607e618e4 (9,483,640 bytes)
docker pull perconalab/tidesdb-mysql:0.4.0

Note: an initial release artifact pushed at 2026-06-04 17:50 contained a stale .so built before commits 374a789 and 0d7fe2c (size 6,903,416, SHA cf9eb516…) — that build lacked the HTON_SUPPORTS_ATOMIC_DDL activation and the COPY-ALTER fix. Corrected artifact re-pushed at 20:57. If you pulled the image during the broken window, re-pull. See the rebuild note in the validation report.

Full commit history

v0.3.1...v0.4.0