Skip to content

v2.2.0

Latest

Choose a tag to compare

@dimitri-yatsenko dimitri-yatsenko released this 01 Apr 15:51
· 3 commits to master since this release
865bd29

What's Changed

For a comprehensive overview of all new features, see What's New in DataJoint 2.2.

Added

  • Graph-driven cascade delete and restrict on Diagram (#1407, fixes #865, #1110): New Diagram.cascade(), Diagram.restrict(), Diagram.prune(), and Diagram.counts() methods replace the error-driven cascade approach. Delete and drop operations now use the pipeline DAG to determine affected tables before executing, with full dry-run support via safemode=True.
  • Thread-safe mode with dj.Instance (#1404): New dj.Instance() class provides independent database connections with connection-scoped configuration. Enables safe concurrent access from multiple threads (e.g., web servers, parallel workers).
  • Directory references in <filepath@store> (#1415, fixes #1410): Filepath storage now supports directory references. is_dir is detected dynamically; existence checks and storage operations handle directories correctly.

Fixed

  • populate() with reserve_jobs=True ignores restrictions (#1414, fixes #1413): Restrictions are now correctly applied when fetching pending keys in distributed mode, matching the behavior of direct (non-distributed) populate.
  • Populate antijoin uses .proj() for correct pending key computation (#1405): Fixes cases where overlapping secondary attributes caused incorrect pending key calculations.
  • Allow attribute names starting with 'index' in declarations (#1412, fixes #1411): Table definitions with attribute names like index_value no longer raise parse errors.
  • Cascade delete failures on MySQL 8 (fixes #1110): The graph-driven cascade in #1407 eliminates the error code mismatch (1217 vs 1451) that caused cascade delete failures on MySQL 8.

Changed

  • Backend-agnostic quoting and adapter abstractions (#1419): Refactored identifier quoting, table name construction, and schema queries into adapter methods for cleaner multi-backend (MySQL + PostgreSQL) support.
  • skip_duplicates=True behavior documented for PostgreSQL (#1417, fixes #1049): PostgreSQL already enforces secondary unique constraints when skip_duplicates=True (raises DuplicateError on secondary unique conflicts, unlike MySQL which skips silently). This asymmetry is now documented and tested.

Full Changelog: v2.1.1...v2.2.0