4.11.1 Version Release
Release Date: Jul 16, 2025

4.11.1 Common Changes

No Specific Changes
4.11.0
Release Date: June 10, 2025

4.11 - DQL & Legacy Compatibility

With 4.11 we are excited to introduce legacy compatibility for DQL, which allows developers to use the new DQL APIs while maintaining compatibility with existing code and data. This capability, called STRICT MODE, is designed to ease the transition to the new APIs and ensure that existing applications continue to function as expected.

DQL Strict Mode

DQL Strict Mode provides control over how DQL statements are evaluated and how data types are inferred. When disabled, it offers more flexibility in working with documents without requiring explicit collection definitions.
For more information see DQL Strict Mode
With strict mode disabled (DQL_STRICT_MODE=false), Ditto is more flexible and will infer the CRDT type based on the document’s shape:
  • Objects are treated as CRDT maps
  • Scalars and arrays are treated as Registers
  • Counters and attachments are inferred from operations
  • Collection definitions are no longer required
Setting DQL Strict Mode
DQL
ALTER SYSTEM SET DQL_STRICT_MODE = false

DQL Differ

DQL 4.11 introduces a new Differ API for calculating diffs between query results. This API can be used with a store observer to understand how its results change over successive callbacks. The Differ API provides a way to track changes in the data and can be used to optimize data synchronization and conflict resolution.Differ API documentation.

DQL Transactions

DQL 4.11 introduces support for transactions. Transactions can be used to group multiple DQL statements together, ensuring that either all of the statements are executed successfully or none of them are. This is particularly useful in scenarios where multiple updates or inserts need to be made to the database, and you want to ensure that either all of them are applied or none of them are.Transactions API documentation.

Advanced DQL Features

DQL 4.11 introduces numerous advanced querying and manipulation features:
FeatureDescriptionExample
UNSET clauseRemove fields from documentsUPDATE orders UNSET items.abc WHERE _id = 'my-id'
CAST functionExplicitly convert between data typesSELECT * FROM products WHERE CAST(price AS INT) > 10
USE IDS clauseDirect document retrieval by IDSELECT * FROM products USE IDS '123', '456'
SIMILAR TOPattern matching expressionsSELECT * FROM products WHERE name SIMILAR TO '%phone%'
Runtime expressionsUse expressions in object/array constructionUPDATE products SET metadata = { 'updated_at': current_timestamp() }
CountersSupport for legacy compatible counter typeUPDATE products APPLY in_stock PN_INCREMENT BY 1.0
In 4.11, functional operations are denoted with an arrow (->) are deprecated. Read more.

Tombstone Reaper

The tombstone reaper is now enabled by default for all SDKs. This feature helps clean up deleted document markers (tombstones) to improve database performance and reduce storage requirements.The reaper:
  • Automatically removes tombstones after a configurable time-to-live (TTL)
  • Uses read transactions for efficiency
  • Includes random scheduling variations to prevent performance problems
  • Tracks the number of tombstones evicted for monitoring
  • Remembers previous reap times across restarts
This improves overall system performance by reducing the long-term accumulation of tombstones when calling DELETE to remove documents.

4.11.0 Common Changelog

Added

  • Introduced DQL_STRICT_MODE as a system parameter to opt-out of requiring collection definitions (#16573)
  • Added transports_ble_adapter_mac system parameter to allow configuring bluetooth adapter MAC address (#16159)
  • Small peers now log the result of OnlinePlayground authentication, including if the supplied shared token was incorrect (#16301)
  • A cumulative running total of the number of tombstones ever evicted by the reaper to Small Peer Info (#16424)
  • Added system parameters to fine-tune Ditto behavior when it encounters a locked persistence directory (#CORE-479)
  • New DQL CAST function to explicitly cast between types (#QE-108)
  • Conditional functions for unknowns (#QE-111)
  • DQL DATE processing functions (#QE-112)
  • New DQL clause USE IDS for direct document retrieval by id (#QE-114)
  • Additional string functions (#QE-124)
  • SIMILAR TO filter expression (#QE-125)
  • PN_COUNTER support (APPLY clause in UPDATE statement) (#QE-127)
  • UNSET clause to the UPDATE statement (#QE-128)
  • MERGE as an alias for UPDATE in the ON ID CONFLICT clause of an INSERT statement (#QE-132)
  • The ability to use runtime-evaluated expressions in object constructs in DQL statements (#QE-133)
  • The ability to use runtime-evaluated expressions in array constructs in DQL statements (#QE-134)
  • Static expressions in mutators (#QE-139)
  • Additional object manipulation DQL scalar functions (#QE-159)
  • EXPLAIN for query plan (#QE-105)
  • More detailed messages about network problems are logged when authentication fails (#SEC-124)

Changed

  • Use the modern rustls-platform-verifier TLS crate on all platforms rather than rustls-native-certs (#15956)
  • The tombstone reaper scheduling to remember the previous reap times across shutdown and restart of the small peer (#16237)
  • The tombstone reaper scheduling code to add random variations, which helps prevent performance problems if/when all peers run the reaper simultaneously (#16286)
  • The tombstone reaper to be enabled by default for all SDKs (#16350)
  • INSERT to now accept either DOCUMENTS or VALUES as the keyword introducing the list of values to insert (#QE-140)
  • Date functions accept “local” as a timezone & use the executing peer’s local timezone (#QE-168)
  • Unified dedicated TCP servers across different transports (Multicast, mDNS, and WiFi Aware) by utilizing a single static TCP server implementation (#TRANS-131)

Fixed

  • Fixed issue where user_collection_sync_scopes could not be updated after initial set (#16299)
  • Fixed: A rare crash on Android devices when shutting down Bluetooth. (#17069)
  • Fixed: Bluetooth connectivity on Apple devices works when background Bluetooth permissions are missing. (#17065)

Removed

  • Old multihop networking stack and system parameter network_use_nextgen_multihop_stack (#16370)
  • TLS certificate compression, which led to incompatibilities (#SDKS-1046)

Performance

  • The tombstone reaper uses read transactions for some of its work instead of holding open a long-running write transaction, thus reducing contention on the small peer database (#16338)
  • Improved speed and efficiency of the tombstone reaping process (#16535)

4.11.0 Rust Specific Changes

Changed: New and improved DQL APIs (#16651) Added: struct Differ, which calculates diffs between query results. This can be used with a store observer to understand how its results change over successive callbacks. (#SDKS-986) Added: struct Diff to represent diffs produced by the Differ. (#SDKS-986)
4.10.5
Release Date: Jun 24, 2025

4.10.5 Rust Specific Changes

Fixed: Windows devices failed to connect to Android on LAN (#17199)

4.10.5 Common Changes

No Specific Changes
4.10.2
Release Date: Apr 25, 2025

4.10.2 Common Changes

Removed: zlib certificate compression for small peer TLS 1.3 session negotiation, which caused incompatibilities (#1005)
4.10.1
Release Date: Apr 02, 2025

4.10.1 Common Changes

Changed: The tombstone reaper scheduling to remember the previous reap times across shutdown and restart of the small peer. (#16237) Changed: the tombstone reaper scheduling code to add random variations, which helps prevent performance problems if/when all peers run the reaper simultaneously. (#16286) Fixed: Unable to update user_collection_sync_scopes after initial set bug (#16299)Performance: The tombstone reaper uses read transactions for some of its work instead of holding open a long-running write transaction, thus reducing contention on the small peer database. (#16338) Changed: The tombstone reaper to be enabled by default for all SDKs. (#16350)
4.10.0
Release Date: March 14, 2025

4.10.0 New Capabilities

4.10.0 Rust Specific Changelog

  • BatchIdOperation::exec to allow getting a specific document within the scope of a write transaction block. (#SDKS-425)
  • Repeated reads of a document within an ID-specific transaction scope of the query builder API now reflect changes made in the same transaction. (SDKS-245)
  • (Experimental) Bus API correctly falls back to multihop connectivity if a direct connection is lost. (#15670)
  • Deprecated arm-unknown-linux-gnueabihf target from support due to missing internal coverage and usage. (#15795)
4.9.4
Release Date: Feb 17, 2025

4.9.4 Common Changes

Added: new system parameter which defines the number of threads used by the store observer runtime to dispatch the sdk callback invocations. For more information reach out to Ditto’s Support (#15814)
4.9.3
Release Date: Jan 23, 2025

4.9.3 Common Changes

Changed: Added more actionable information to common connection handshake issues. (#15298) Fixed: Fixed: Some Android devices could fail to export logs to the portal due to a file permissions error (#15582)
4.9.2
Release Date: Dec 19, 2024
No Rust Specific Changes
4.9.1
Release Date: Dec 13, 2024

4.9.1 Common Changes

Fixed: iOS 18 crashes related to Bluetooth LE are now resolved. (#15351) Fixed: Disk usage stats are now reported in small peer info on android devices
4.9.0
Release Date: Nov 21, 2024

4.9.0 Rust Specific Changes

The 4.9.0 Rust release has come with a collection of API changes designed to align the Rust SDK with the standards of our other SDK. These changes were done to align naming conventions as well as to regorganice the module to make it more consistent with other SDKs.These API changes include a number of depreciated APIs. For insteances where APIs are depreciated you’ll find replacement APIs provided.All changes are backwards compatable.

General Changes

Fixed: Resolved an issue where store_observer.is_cancelled() could return incorrect values (#14419). Added: ditto.update_transport_config() API (#5928) Added: V3ConnectionType to provide internal access to a presence peer’s connection type (#12945). Added: #[must_use] attribute on Subscription, PresenceObserver, and LiveQuery to encourage correct usage (#13256).

API Renaming

Deprecated: ditto.authenticator() & DittoAuthenticator::new(#13606, 13851)
  • Useditto.auth()
Deprecated: ditto.current_transport_config() (#13606).
  • Use ditto.transport_config()
Deprecated: ditto.application_id() (#13606).
  • Use ditto.app_id()

Module Reorganization

Added a dedicated presence module for the Presence API Deprecated: dittolive_ditto::transport::{Peer, Presence, PresenceGraph, PresenceObserver, PresenceOs, Connection, ConnectionType} (#13645).
  • use dittolive_ditto::presence::{Peer, Presence, PresenceGraph, PresenceObserver, PresenceOs, Connection, ConnectionType}
Added: dittolive_ditto::presence::{ConnectionRequest, ConnectionRequestAuthorization} (previously only available via prelude) (#13645)Flattened store module, improved store docs Changed: Moved store::dql module to crate-level Deprecated: store::attachment, store::collection, and store::collections modules, with items moved to streamlined modules.
  • use store::attachment::{FetcherVersion, DittoAttachmentFetcher, DittoAttachmentToken, DittoAttachmentFetchEvent, DittoAttachmentTokenLike}
Deprecated: store::collections::{event, pending_collections_operation} modules
  • use store::collections::{CollectionsEvent, PendingCollectionsOperation, CollectionsEventHandler}
Deprecated: store::collection::{document, document_id, pending_cursor_operation, pending_id_specific_operation, type_traits} modules
  • use store::collection::{DocumentId, PendingCursorOperation, PendingIdSpecificOperation, DittoDocument, DittoMutDocument, MutableValue}
Changed: Moved dql::{StoreObserver, ChangeHandler, ChangeHandlerWithSignalNext, SignalNext} to the store moduleAdditonal Module Changes Changed: Moved SyncSubscription to sync module, updated docs (#13645) Removed: ditto module from the public API (#13645).
  • Moved ditto module contents to crate-level (#13645)
Deprecated: the auth module, items moved to identity (#13645) Deprecated: the observer module and Observer trait (#13645) Changed: Moved SyncSubscription to sync module (#13702)
  • Changed: Updated sync module docs (#13702)
  • Deprecated: dittolive_ditto::store::dql::SyncSubscription
  • Added: dittolive_ditto::sync::SyncSubscription
Added: DittoMutableCounter and DittoMutableRegister to prelude Added: New store::query_builder module as home for all QueryBuilder types (#14162)
  • Deprecated: crate-level types module, contents moved into query_builder
  • Deprecated: store::{batch,collection,collections,live_query,update} modules, contents moved into query_builder
  • Deprecated: crate-level subscription module, Subscription moved into query_builder module

Depreciated unused and unintentially exposed items

Deprecated: removed ValidityListener from public API (#13857) Deprecated: DittoBuilder::new()
  • use Ditto::builder() instead.
Deprecated: the store::timeseries module and items (#13902) Deprecated: SiteId, use ditto.presence().graph().local_peer.peer_key_string instead

4.9.0 Logging Clarity Improvements

This release comes with a number of logging clarity improvements. The goal of these changes are to make Ditto logs more consumable and actionable for end users. While there are wide ranging changes one of the principal goals of this work is to make our INFO level logs contain the right information to understand the state and health of the Ditto SDK.
  • More information is included when physical connections start and end (such as the type of connection and the remote peer’s key)
  • Devices that try to connect to themselves now say “device has connected to itself” instead of an error about the remote site ID being the same as the local peer
  • Authentication client logs have been made more human readable. In particular:
  • Recoverable errors are logged together with information about the recovery actions that are being undertaken
  • Several abbreviations have been replaced with human-readable descriptions
  • Errors are printed using their descriptions rather than by dumping debug representations
  • Abbreviated jargon has been replaced with clearer wording in various log lines
  • “phy ended” has become “physical connection ended”
  • “error getting char” has become “required Ditto BLE characteristic not found”
  • “error getting radio state” has become “error getting Windows Bluetooth radio state”
  • Peer events that represent a transport starting or stopping are now logged with the message “transport started”/“transport ended” rather than as a raw peer_event=… log
  • Reduced the noisiness of “starting” log lines around Ditto initialization time
  • Noise from long peer keys in logs has been reduced in some places by replacing them with their truncated form
  • Noise from duplicated peer ID/peer key information in replication logs has been reduced by consolidating the information
  • “starting compression and export” is now followed by a “completed export” log at the same level
  • Successful SQLite WAL recovery logs were further lowered from INFO to DEBUG

4.9.0 Common Changes

Added: regexp_like function in DQL. (#12129) Added: peer_metadata and identity_service_metadata to the small peer info document (#12477) Added: WebSocket connections now send X-DITTO-PEERPUBKEY and X-DITTO-ROUTING-HINT headers as part of the client connect handshake on all platforms except wasm32 (#13171) Added: Small Peer Info now includes information about the current logger configuration (#14317) Added: Permission rules can be written in DQL. (#14563) Added: Ditto logs clearly indicate if a device has established a connection to itself. (#14634) Added: the ability for DQL select statement to produce arbitrary projection lists. (#7979) Added: local subscription info to small peer info (#9412) Added: “device_disk_usage” information to small peer info (#9784) Added: “store” information to small peer info (#9785) Changed: Internal sync metadata format changed. Peers that downgrade to a previous SDK version after upgrading may require full resynchronization. (#14799) Changed: Improved (de)serialization performance and reduced its contribution to the library size (#11545) Changed: In updated replication protocol, verification of a received update file no longer requires both peers to use the same approach to subscription hashing. (#12672) Changed: Experimental multihop connectivity is more resilient to mesh disruptions (#13648) Changed: Synchronization protocol enhanced to reduce the amount of redundant data sent from small peers to big peers. (#13737) Changed: Failed certificate verification due to a lagging device clock now results in a clearer error message (#14035) Changed: Multicast peer-to-peer transport is no longer deprecated to improve support for environments where mDNS is unavailable (#14188) Changed: Replication no longer redundantly re-transmits unchanged subscriptions after eviction. (#14290) Changed: truncated peer keys are now logged in lieu of site IDs. (#14362) Changed: improved logging in the authentication code to provide more useful error context. (#15038) Changed: made the small peer “log request” feature much more responsive (#9777) Fixed: Windows P2P LAN now can connect to IPv6 peers (#11468) Fixed: In certain rare cases, resetting the same replication session multiple times could cause failure to converge. (#12616) Fixed: Internal connection TLS caches are now bounded in size. This prevents a long living peer from holding onto more memory than required. (#13801) Fixed: small peer info “metadata” is now persisted across app launches. (#13987) Fixed: Bluetooth peers are handled better when disconnections occur, fixing a possible loop where a device might repeatedly try and fail to connect. (#14018) Fixed: When replication sessions time out, write transactions on the document store may be blocked for a long period. (#14148) Fixed: Multicast peer-to-peer transport (non-MDNS) is no longer influenced by TCP listen configuration in DittoTransportConfig (#14187) Fixed: an issue preventing attachment transfers under high document sync load is now resolved. (#14189) Fixed: A race condition that could cause attachments to unexpectedly crash under heavy load. (#14342) Fixed: device name no longer incorrectly defaults to “ditto” in small peer info, when a named device first starts syncing (#14674) Fixed: presence observers are now less-likely to fire when there is no observable change to presence data. (#14807) Fixed: Logs report blocked_by=“no blocking transaction” when blocking transaction is known (#14966) Fixed: In-band authentication data is now cleared on logout. (#15039) Fixed: switching appIDs now invalidates cached authentication material correctly. (#15040) Fixed: Transport conditions are now reported for a wider range of failures when starting Bluetooth and mDNS transports. (#8729) Fixed: documentation for the stopSync() method to clarify that the Ditto store can be used locally after stopping sync. (#8849) Fixed: Auth Client would hang when cached X.509 was expired. (#15110) Deprecated: Removed: