4.12.1 Common Changes
Fixed: A bug where x509 refresh could speed up uncontrollably. (#17947) Fixed: A bug where a peer could get stuck with incorrect connection information. (#17967) Added:ENABLE_ATTACHMENT_PERMISSION_CHECKS
ALTER SYSTEM parameter to be set to false
to avoid certain rare cases of attachment fetcher hanging (#18016) Fixed: Network connections close gracefully when Ditto is stopped. (#18053) Fixed: The system:data_sync_info
collection may briefly report sync immediately after connecting (#18137)Other: improve error reporting for document (de)serialization (#18165) Fixed: Live queries being unable to use indices. (#DS-447) Fixed: Use of DISTINCT with ORDER BY & OFFSET/LIMIT. (#QE-281)4.12 - DQL Enhancements & Platform Expansion
Version 4.12 brings significant enhancements to DQL (Ditto Query Language) with production-ready projections and aggregates, expanded platform support with Flutter for Linux and macOS, and marks the deprecation of legacy query builder APIs in preparation for DQL as the primary interface.DQL Projections & Aggregates
DQL projections and aggregates are now out of preview and fully production-ready. These powerful features enable sophisticated data analysis and optimized query performance directly within DQL.Projections
Select specific fields and create calculated columns to reduce data transfer and processing:DQL
Aggregate Functions
Perform calculations across multiple documents with SQL-standard aggregate functions:DQL
For complete documentation, see DQL SELECT operations
DQL Index Management
Create and manage indexes directly through DQL for improved query performance:DQL
For complete documentation, see DQL Indexing
Flutter Platform Expansion
Linux Support
Flutter developers can now build and deploy Ditto-powered applications on Linux desktops:- Native Linux binary (
libdittoffi.so
) included - Full support for development, testing, and production deployments
- Configurable binary path via
$LIBDITTOFFI_PATH
environment variable - Compatible with Flutter’s standard Linux development workflow
See Flutter Install Guide for Linux setup instructions
Legacy Query Builder Deprecation
The entire legacy query builder API is deprecated across all SDKs. Developers should migrate to DQL for all data operations:Migration Benefits:- SQL-like syntax familiar to developers
- Unified interface for all data operations
- Better performance and optimization
- More powerful query capabilities
Legacy query builder APIs will be removed in SDK v5. Start migrating to DQL now using the migration guide.
Additional Enhancements
System Improvements
- Enhanced disk observer: Now enabled at startup with configurable batch settings
- Improved error handling: Better error propagation and syntax error identification in DQL
- Memory optimizations: Reduced memory usage for aggregate operations and projections
DQL Function Additions
- Duration scalar functions for date/time calculations
- Dynamic field references in queries
- Support for arrays as operation values
- Extended multiplication operations for better numeric handling
Security & Diagnostics
- Support for
SSLKEYLOGFILE
for debugging TLS connections - New
system::data_sync_info
virtual collection for sync diagnostics - Transport diagnostics APIs across multiple SDKs
Upgrading to 4.12
To take advantage of these new features:- Update your SDK to version 4.12.0 or later
- Begin migrating legacy query builder code to DQL
- Explore projections and aggregates for query optimization
- Consider Flutter Linux support for desktop deployments
Version 4.12 maintains full backward compatibility while encouraging migration to modern DQL APIs. Legacy APIs continue to function but should be replaced in preparation for SDK v5.
4.12.0 Common Changelog
Added
- The
transports_discovered_peers
system parameter to dynamically update peers discovered out-of-band (#17009) - The new
system::indexes
virtual collection for viewing DQL indexes on small peers (#17011) - Support for
SSLKEYLOGFILE
for inspecting network traffic in tools like Wireshark (#17029) UPDATE_LOCAL_DIFF
id conflict strategy for INSERT statements (#17310)- A system:data_sync_info virtual collection that exposes per-remote data sync status via DQL (#17360)
transports_tcp_so_nodelay
system parameter to control TCP_NODELAY for TCP and TCP-based websockets connections (#17673)- Additional metadata to keep track of the timestamp of the last update file received (#DS-290)
- Observers for DQL queries can now access system virtual collections (#DS-294)
- Query executor runner to observers - they now support all of the new DQL features like projections, aggregates, use ids… (#QE-143)
- SYSTEM:COLLECTIONS & SYSTEM:ALL_COLLECTIONS virtual collections to list accessible collections (#QE-146)
- Support for ARRAYs as the value options list in IN DQL expressions (#QE-167)
- DQL scalar functions for durations (#QE-170)
- DQL support for CREATE INDEX (#QE-182)
- DQL support for DROP INDEX (#QE-183)
- Support for dynamic field references in DQL statements (#QE-2)
- Query request history cache qualifiers for system datasource deletes and general mutations (#QE-207)
- Basic RBO for index scan selection (#QE-210)
- Query parser handles context dependent keyword (#QE-241)
- Virtual collections for active and historical DQL engine requests (#QE-82)
Changed
- device_disk_observer_is_enabled system parameter can now be changed at runtime (#CORE-612)
- After eviction, document sync now retains high-level session metadata for non-expired sessions, for sync status tracking purposes (#DS-348)
- Projection, distinct and aggregate features out of preview mode! (#QE-100)
- Wildcard expansion to top-level with left-to-right, last-wins projection aliasing (#QE-156)
- Improved ScalarExpr representation in EXPLAIN output (#QE-193)
- Improved syntax error identification in UPDATE statements (#QE-199)
- ALTER SYSTEM DQL statements now accept static expressions (#QE-204)
- USE IDS clause to accept expressions that can be statically evaluated (#QE-217)
- Permit use of unary plus in DQL expressions (#QE-220)
- Extended DQL multiplication to better handle multiplying two large negative integers (#QE-224)
- Query directives processing to accept USE INDEX as the equivalent of USE DIRECTIVES
{"#index":...}
(#QE-255) - CREATE & DROP INDEX statements accept IF [NOT] EXISTS to permit repeated execution without error (#QE-259)
- Websocket connectivity errors are now logged with additional detail (#TRAN-511)
- Ditto no longer includes a peer’s device name and OS during P2P advertisement (BLE, mDNS, Wi-Fi Aware, AWDL) (#TRAN-652)
Fixed
- A rare race condition which caused connection handshakes to erroneously fail (#17251)
- Merge tombstone summaries when applying remote tombstone (#17654)
- Set default TCP_NODELAY socket option to true to improve latency, notably on Linux (#17673)
- DQL collation order is based on length of arrays / objects, not padding values with extra MISSING (#QE-171)
- DQL scalar function clock() and “local” timezone in WASM environments (#QE-181)
- Error propagation from collection scans (#QE-191)
- Collation in DQL aggregates (#QE-216)
- Panic when using COUNT(*) in a dynamic object (#QE-219)
- Panic when subtracting a large positive integer value from a large negative integer value (#QE-223)
- Aggregate output on empty result sets (#QE-242)
Performance
- Revised fetching documents by ID in Query to operate in batches (#QE-248)
Other
- Added a warning to the log when a subscription query uses a LIMIT or ORDER BY (#QE-169)
4.12.0 JavaScript & React Native Specific Changes
Added:setAvailablePeerToPeerEnabled(enabled: boolean)
method to TransportConfig
, which enables peer-to-peer transports supported on the current platform. (#16520) Added: Support for Wi-Fi Aware (NAN) transport in TransportConfigPeerToPeer
, enabling P2P communication on supported Android devices. (#16520) Added: Support for WiFiAware
as a new ConditionSource
value, enabling transport condition observation for Wi-Fi Aware connections in the Ditto.observeTransportConditions
API. (#16520) Added: Wi-Fi Aware as a new transports protocol for React Native (Android only). (#16520) Deprecated: setAllPeerToPeerEnabled()
in favor of setAvailablePeerToPeerEnabled()
. The new method is safer and respects platform transport availability. (#16520) Added: macOS support for Ditto React Native. (#17244) Added: method Ditto.sync.start()
to replace deprecated Ditto.startSync()
(#17321) Added: method Ditto.sync.stop()
to replace deprecated Ditto.stopSync()
(#17321) Added: property Ditto.sync.isActive
to replace deprecated Ditto.isSyncActive
(#17321) Added: type PeerOS
to represent the operating system a peer is running on (#17321) Changed: narrowed type of Peer.os
from string
to PeerOS
(#17321) Deprecated: AuthenticationHandler
(#17321) Deprecated: Authenticator.loginWithUsernameAndPassword()
(#17321) Deprecated: Authenticator.loginWithToken()
, use Authenticator.login()
instead (#17321) Deprecated: Logger.setLogFile()
(#17321) Deprecated: Logger.setLogFileURL()
(#17321) Deprecated: Logger.emojiLogLevelHeadingsEnabled
(#17321) Deprecated: Ditto.sdkVersion
, use Ditto.version
instead (#17321) Deprecated: Ditto.startSync()
, use ditto.sync.start()
instead (#17321) Deprecated: Ditto.stopSync()
, use ditto.sync.stop()
instead (#17321) Deprecated: Ditto.isSyncActive
, use ditto.sync.isActive
instead (#17321) Deprecated: Ditto.path
, use Ditto.persistenceDirectory
instead (#17321) Deprecated: Ditto.siteID
, use peerKeyString
instead (#17321) Deprecated: Ditto.observePeers()
, use ditto.presence.observe()
instead (#17321) Deprecated: Ditto.runGarbageCollection()
(#17321) Deprecated: PresenceConnectionType
type, replaced by ConnectionType
(#17321) Deprecated: RemotePeer
type, replaced by Peer
(#17321) Deprecated: siteID
property in IdentityOfflinePlayground
(#17321) Deprecated: siteID
property in IdentitySharedKey
(#17321) Added: error code authentication/expiration-handler-missing
to ERROR_CODES
(#17404) Added: error code validation/invalid-ditto-config
to ERROR_CODES
(#17404) Added: (Preview) class DittoConfig
- a unified configuration object that encapsulates all parameters required to configure a Ditto instance. Required by the new Ditto.open()
and Ditto.openSync()
factory methods. This API will become the standard way to initialize Ditto instances in v5. (#17404) Added: union type DittoConfigConnect
, which includes interfaces DittoConfigConnectServer
and DittoConfigConnectSmallPeersOnly
, representing the connectivity options for a DittoConfig
instance. (#17404) Added: (Preview) Ditto.open()
, an async, fallible factory method for creating Ditto
instances, alongside the synchronous convenience variant Ditto.openSync()
. These will replace the Ditto
constructor in v5. (#17404) Added: (Preview) function type AuthenticationExpirationHandler
, an async handler for authentication expiration events. This will replace the phased out AuthenticationHandler
type in v5. (#17404) Added: (Preview) property Ditto.config
, a read-only property that provides access to the configuration of the Ditto
instance. This will be the standard way to access configuration in v5. (#17404) Added: (Preview) read-only property Authenticator.expirationHandler
, holding an AuthenticationExpirationHandler
. (#17404) Added: (Preview) method Authenticator.setExpirationHandler()
, which allows setting the authentication expiration handler. (#17404) Added: (Preview) static property Authenticator.DEVELOPMENT_PROVIDER
, which provides the development authentication provider string constant. (#17404) Added: Ditto.absolutePersistenceDirectory
, a read-only property that provides the absolute path to the persistence directory. (#17404) Added: Ditto.DEFAULT_ROOT_DIRECTORY
, a static property that provides the default base directory used on the current platform to resolve the effective persistence directory path when DittoConfig.persistenceDirectory
is not specified or specified as a relative path. (#17404) Deprecated: the context
property of DittoError
. (#SDKS-1096) Added: read-only property commitID
to class QueryResult
. (#SDKS-1280) Changed: The ditto native library on Android is now 16KB aligned to meet Google Play’s upcoming requirement, effective November 2025. (#SDKS-1333) Fixed: Creating a Ditto instance using an online with authentication identity without required authentication handlers will now throw a descriptive error message. (#SDKS-254) Deprecated: The siteID
property on Ditto
in favor of peerKeyString
on Peer
. (#SDKS-699) Deprecated: The siteID
field on the IdentityOfflinePlayground
interface. A warning will be logged when this field is specified. (#SDKS-699) Deprecated: The siteID
field on the IdentitySharedKey
interface. A warning will be logged when this field is specified. (#SDKS-699) Deprecated: The address
property on the Peer
interface, and the associated Address
type. Please use peerKeyString
instead. (#SDKS-699) Deprecated: The addressToString
function. (#SDKS-699)- Added method
QueryResult.mutatedDocumentIDsV2()
, use this instead of the deprecatedQueryResult.mutatedDocumentIDs
. (#SDKS-907) Deprecated: classBasePendingCursorOperation
, use DQL (Ditto Query Language) instead. (#SDKS-907)
BasePendingIDSpecificOperation
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class Collection
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class CollectionsEvent
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class Counter
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class Document
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class DocumentID
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class DocumentPath
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class LiveQuery
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class LiveQueryEventInitial
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class LiveQueryEventUpdate
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class MutableCounter
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class MutableDocument
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class MutableDocumentPath
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class MutableRegister
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class PendingCollectionsOperation
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class PendingCursorOperation
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class PendingIDSpecificOperation
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class Register
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class SingleDocumentLiveQueryEvent
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class Subscription
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class UpdateResult
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class UpdateResultsMap
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class WriteTransaction
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class WriteTransactionCollection
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class WriteTransactionPendingCursorOperation
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class WriteTransactionPendingIDSpecificOperation
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: interface LiveQueryMove
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: interface WriteTransactionResult
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: method QueryResult.mutatedDocumentIDs
, use QueryResult.mutatedDocumentIDsV2()
instead (#SDKS-907) Deprecated: method SmallPeerInfo.getSyncScope()
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: method SmallPeerInfo.setSyncScope()
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: method Store.collection()
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: method Store.collectionNames()
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: method Store.collections()
, use DQL (Ditto Query Language) instead Deprecated: method Store.write()
, use Store.transaction()
instead. (#SDKS-907) Deprecated: property SmallPeerInfo.syncScope
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: type CollectionsObservationHandler
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: type DocumentIDValue
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: type LiveQueryEvent
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: type QueryArguments
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: type QueryObservationHandler
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: type SingleObservationHandler
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: type SmallPeerInfoSyncScope
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: type SortDirection
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: type WriteStrategy
, use DQL (Ditto Query Language) instead. (#SDKS-907)4.11.4 Common Changes
Fixed: A bug where x509 refresh could speed up uncontrollably. (#17947) Fixed: A bug where a peer could get stuck with incorrect connection information. (#17967)4.11.3 Common Changes
Fixed: An issue with BLE on some Android 9 and earlier devices that prevented connection establishment. (#17760)4.11.2 JavaScript & React Native Specific Changes
Fixed: The sporadic app crashes when authentication token expired on React Native. (#17546)4.11.2 Common Changes
Fixed: A rare race condition which caused connection handshakes to erroneously fail. (#17251) Changed: device_disk_observer_is_enabled system parameter can now be changed at runtime (#CORE-612)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
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
DQL
DQL Differ
DQL 4.11 introduces a newDiffer
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:Feature | Description | Example |
---|---|---|
UNSET clause | Remove fields from documents | UPDATE orders UNSET items.abc WHERE _id = 'my-id' |
CAST function | Explicitly convert between data types | SELECT * FROM products WHERE CAST(price AS INT) > 10 |
USE IDS clause | Direct document retrieval by ID | SELECT * FROM products USE IDS '123', '456' |
SIMILAR TO | Pattern matching expressions | SELECT * FROM products WHERE name SIMILAR TO '%phone%' |
Runtime expressions | Use expressions in object/array construction | UPDATE products SET metadata = { 'updated_at': current_timestamp() } |
Counters | Support for legacy compatible counter type | UPDATE 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
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 JavaScript & React Native Specific Changes
Fixed: Creating multiple Ditto instances with the samepersistenceDirectory
parameter now throws a DittoError
with code store/persistence-directory-locked
instead of only logging an error. This change prevents constructing a non-functional instance as Ditto does require separate configurations for this parameter when multiple instances are instantiated. (#12336) Added: Error code store/persistence-directory-locked
to the DittoError
class. (#12336) Added: property SmallPeerInfo.syncScope
to replace the now deprecated methods SmallPeerInfo.getSyncScope()
and Ditto.smallPeerInfo.setSyncScope()
. (#15579) Deprecated: Methods SmallPeerInfo.getSyncScope()
and SmallPeerInfo.setSyncScope()
, use the SmallPeerInfo.syncScope
property instead. (#15579) Added: Method transaction()
on Store
allowing a DQL transaction to be performed. (#15800) Added: Transaction
representing an active DQL transaction. (#15800) Added: TransactionInfo
encapsulating information about a transaction. (#15800) Added: TransactionCompletionAction
representing an action to be taken upon completing a transaction: Commit or Rollback. (#15800) Added: An opt-in Android foreground service which allows Ditto to sync in the background. (#16097) Added: ditto.observeTransportConditions()
API for React Native that will allow developers to be aware transports conditions changes, like shutting down bluetooth. (#16518) Added: class Diff
to represent diffs produced by the Differ
. (#16723) Added: class Differ
, which calculates diffs between query results. This can be used with a store observer to understand how its results change over successive callbacks. (#16723) Added: More detailed messages about network problems are logged when authentication fails (#SEC-124) Changed: Unify dedicated TCP servers across different transports (Multicast, mDNS, and WiFi Aware) by utilizing a single static TCP server implementation (#TRANS-131)4.10.2 Common Changes
Removed: zlib certificate compression for small peer TLS 1.3 session negotiation, which caused incompatibilities (#1005)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 New Capabilities
Support for React Native Expo CNG
Ditto’s React Native SDK now supports Expo for iOS & Android native development. To get started with React Native with Expo see
SDK>React Native Install Guide
Small Peer User Collection Sync Scopes
User Collection Sync Scopes let you control how data from each user collection is shared with other connected Peers. This is useful when you want to fine-tune which collections do not sync, which collections sync with only Ditto Server and which collections sync only with connected Small Peer devices.Sync scopes can be used to control how documents sync, reduce unnecessary data transfer, and improve performance.For more information see
SDK>Configuring Collection Sync
There is a known issue that once a
startSync()
is called USER_COLLECTION_SYNC_SCOPES
cannot be updated without
closing and reopening a new Ditto instance. This will be resolved in the next release. For more information
see Updating Sync Scopes
Details
Sync Scope | Purpose |
---|---|
”AllPeers” (default) | Sync with both Ditto Server and other Small Peers. This is the default behavior for all collections. |
”BigPeerOnly” | Sync only with Ditto Server (Big Peer). Do no sync with other Small Peers. |
”SmallPeersOnly” | Sync only with other Small Peers. Do not sync with Ditto Server. |
”LocalPeerOnly” | Do not sync this collection to Ditto Server or other Small Peers. |
DQL
local_mesh_orders
to only sync with other small peers in the mesh and not with Ditto Serverusing the SmallPeersOnly
sync scope.Store Observers Run Multi-Threaded By Default
Ditto store observers (e.gditto.store.registerObserver(...)
) will now run multi-threaded on all platforms (except for in Web Browsers)
by default. Prior to 4.10.0
all store observers would run on the same thread which could lead to performance issues for applications
with multiple store observers. Users may see performance improvements on applications using more than one store observer, especially during
high-volume usage.Ditto guarantees order sequencing for a single observer. Because observers now run in parallel there is not a guarantee for order
sequencing between observers. This behavior change should not have an impact on your application. If you have concerns or questions
about this behavior change reach out to Ditto’s Customer Support.To reset Ditto to only use a single thread for all Ditto observers use the following system parameter. For instruction on how to set
a system parameter in your specific SDK see SDK>Customizing System Settings
DQL
DQL Support for LIKE
operator
The LIKE
operator can now be used for pattern matching of string values.For more information see
DQL>Operator Expressions
Pattern | Meaning |
---|---|
% | Matches zero or more characters (like .* in regex) |
_ | Matches exactly one character (like . in regex) |
DQL
DQL New Objects operators
DQL now supports two new methods for querying over the keys and values in an object.object_keys(object)
: Returns anarray
with all the keys in the givenobject
.object_values(object)
: Returns anarray
with all the values inobject
.
For more information see
DQL>Operator Expressions
DQL LIMIT/ OFFSET / ORDER BY support for mutation operators
Users can now useLIMIT
, OFFSET
and ORDER BY
in EVICT
and UPDATE
statements.DQL ExampleDQL
4.10.0 JavaScript & React Native Specific Changelog
- Add support for React Native Expo CNG
- Repeated reads of a document using an ID-specific transaction cursor of the query builder API now reflect changes made in the same transaction. (SDKS-245)
- Errors regarding missing
dittoffi_query_result_item_free()
andditto_clear_presence_callback()
functions in React Native. (#SDKS-555) - Interface IdentityOnlinePlayground to add property
customAuthURL
and allow authenticating with a custom authentication service instead of the Ditto cloud. (#15904)
4.10.0 Common Changelog
Added
- In DQL, an element of an array can be accessed by expression. (feat: Disallow double-quoted identifiers inside of new operators #12529)
- DQL field and element selection (DQL: Support field and element selection. #13920)
- Full support for DQL virtual collections, and the system:dual virtual collection (parser changes for virtual collections #14954)
- On Android, logs now indicate if a missing permission is not declared in an app’s AndroidManifest.xml. (Clarify Android missing permission messages based on manifest presence #15094)
- LIKE DQL operator. (#QE-104)
-
Added
object_keys
andobject_values
scalar DQL functions. (#QE-73) - A new system parameter network_use_nextgen_multihop_stack to switch between our existing and experimental next generation network stacks (#15362)
- Enabled zlib certificate compression (RFC8879) for small peer TLS 1.3 session negotiation ([security] enable TLS certificate compression #15801)
- A system parameter to selectively disable the BLE peripheral (server) transport. (New System Parameter: transports_ble_peripheral_is_enabled #15802)
- A STORE_OBSERVERS_NUM_THREADS system parameter to tweak the number of threads used by our store observer runtime to dispatch the sdk callback invocations. (Allow different live queries to be called in parallel #15814)
- The ability to configure a TTL for tombstones in the small peer store, which can be cleaned up via periodic sweeps from the new “reaper” module. (Finish porting the prototype tombstone reaping implementation into main #15886)
- Support for the new DQL DELETE statement on small peers. (Stabilize the DQL DELETE statement on SP #15899)
- A new Small Peer Info section named “reaper” and a field named “last_reap_time” that indicates the last time the tombstone reaper successfully completed its cleanup of expired tombstones. (Add small-peer-info field to track last completed reaper timestamp #16000)
- Add support for LIMIT, OFFSET and ORDER BY for mutation statements iin DQL (feat(query/dql): Support ORDER BY, LIMIT, OFFSET in mutation statements #16020)
- Added support for permanent system wide document deletes with the DELETE keyword in DQL for all Small Peer SDKs. This change requires a coordinated release with Ditto Server to ensure data is completely removed from the system. The Ditto Server change will be rolling out over the coming month and Ditto will be making a larger announcement upon release. For usage on deletes prior to the larger announcement see the following documents. Note that these documents are only accessible via their direct links and will not appear in the navigation bar just yet. For support on using deletes in your application reach out to Ditto Customer Support to get started.
Fixed
- A rare scenario where stopping sync with in-progress TCP connections could result in a crash. (#TRANS-303)
- If Ditto’s storage is cloned to another device (not recommended), clones which connect to each other will automatically create a new Peer Key and reauthenticate so that sync can proceed (Trigger reset peer identity when another peer clearly has the same Peer Key, add integration test #14653)
- On Android, missing system permissions will no longer crash Ditto. (Check for normal permissions in DittoSyncPermissions #15233)
- Fixed initialisation failing for the Linux Bluetooth transport due to invalid dbus messages (Linux BLE baseline bugfixes #15717)
- Fix OldQL and DQL comparison between large floats and integers returning an arbitrary result (Fix OldQL and DQL comparison between large floats and integers #15949)
- Reduced duplicate notifications for authentication state changes. (auth client: validity_update only on changes #15981)
Changed
- The link_enabled system parameter has been renamed to network_enable_multihop ([network] Add configurability for switching between legacy & next gen networking stacks #15362)
- Improve authentication flow over bad connections (Auth client/server improvements around challenge tokens #15430)
- Store observers are now invoked in parallel by default. (STORE_OBSERVERS_NUM_THREADS to default to 0 = num_cpus #16064)
- Synchronization protocol enhanced to reduce re-transmission of document data and metadata after eviction. (#DS-188)
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 JavaScript & React Native Specific Changes
Fixed: renamed a misspelled property in thePeer
type to the correct spelling dittoSdkVersion
from the previous, incorrect spelling dittoSDKVersion
. (#SDKS-176)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)No JavaScript Specific Changes
4.9.1 JavaScript & React Native Specific Changes
Changed: Enhanced the efficiency of our memory management processes on React Native. (#15126) Changed: Optimized JSI runtime object management for greater efficiency and responsiveness on React Native. (#15170)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 devices4.9.0 JavaScript Release Notes
Added: login() method to Authenticator which enables access to userInfo provided by the configured authentication webhook. (#12354) Added: new methods PendingIDSpecificOperation.updateV2(), and WriteTransactionPendingIDSpecificOperation.updateV2() to replace the deprecated update() methods. These methods do not throw when the document with the given ID can not be found, and call the given closure with null instead. Additionally, these methods throw when given an unsupported async closure argument. (#14504) Added: (React Native) React Native apps can now also set a logging callback using Logger.setCustomLogCallback(). This API was previously not available in React Native environments. (#14658) Added: CFBundleShortVersionString inside the React Native framework. (#14845) Changed: Error messages and documentation for APIs not supported in React Native environments. Some parts of the SDK’s API, in particular the original query builder APIs, are not supported and throw errors when called from a React Native app. In these cases, error message wording and documentation has been improved to make it easier to find the right replacement APIs to use instead. (#14612) Changed**: (React Native)** Transitioned from static to shared libraries to improve load times and reduce overall application size. This change requires updates to build configurations to ensure dynamic linking is correctly handled. See our integration guide for detailed instructions on updating your project settings. (#15018) Fixed: Passing an unsupported async closure to any cursor operation’s update() method now logs a warning. This includes PendingIDSpecificOperation.update(), PendingCursorOperation.update(), WriteTransactionPendingIDSpecificOperation.update(), and WriteTransactionPendingCursorOperation.update(). (#14504) Fixed**: (React Native)** Sporadic Android BLE crash when syncing with other peers. (#15018) Deprecated: Method loginWithToken() from Authenticator. Use the newly added login() method instead. (#12354) Deprecated: PendingIDSpecificOperation.update(), and WriteTransactionPendingIDSpecificOperation.update() whose behavior did not match their documentation. Use each class’s new updateV2() method instead. (#14504) Removed: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:4.8.4 Common Release Notes
Fixed: Some Android devices could fail to export logs to the portal due to a file permissions error (#15582)4.8.3 React Native Specific Changes
Changed: Error messages and documentation for APIs not supported in React Native environments. Some parts of the SDK’s API, in particular the original query builder APIs, are not supported and throw errors when called from a React Native app. In these cases, error message wording and documentation has been improved to make it easier to find the right replacement APIs to use instead. (#14612)4.8.3 Common Release Notes
Fixed: iOS 18 crashes related to Bluetooth LE are now resolved. (#15351) Changed: Added more actionable information to common connection handshake issues. (#15298)4.8.2 JavaScript Specific Changes
Fixed: Missing API reference for class UpdateResult. (#14611)4.8.2 Common Changes
Fixed: Setting the minimum log level to WARN or ERROR will now correctly filter out very early logger initialization messages. (#14451) Fixed: A bug that could prevent an attachment created with the same data on multiple peers from syncing. (#14481)4.8.1 JavaScript Release Notes
Fixed: Prevent race condition that can cause attachment fetchers to fail being cleaned up. (#13961) Fixed: a memory leak affecting attachments downloaded using the legacy query builder API. (#13819) Fixed: iOS devices may fail to sync on LAN when the app is backgrounded then foregrounded. (#14150)4.8.1 Common Changes
Added: The presence_use_multihop system parameter can be used to disable replicating presence information to other peers in the mesh, reducing network overhead. Use ONLY with guidance from the Ditto Customer Experience team. (#14128) Changed: When failing to load document data sync (replication) metadata, Ditto now attempts to clear and regenerate the metadata. This is a behavior change where previously Ditto would fail to start. This serves to prevent problems after SDK version downgrades. (#13111) Fixed: A rare issue where attachments may not be transferred between two peers.(#14158) Fixed: On-disk logs are more robust in situations with unexpected Ditto shutdown. (#13723)The version 4.8.0 SDK release update brings a substantial number of improvements and new features designed to enhance your development experience and provide even more powerful tools for building robust, real-time applications.
4.8.0 JavaScript Release Notes
Added: Method exportToFile() to Logger, which exports collected logs to a compressed and JSON-encoded file on the local file system. Logs returned through this method are at DEBUG log level. This new API can be used to do forensic log gathering on a device. Logs are always collected and restricted to a fixed specific size limit to ensure they don’t grow endlessly. Once the size limit has reached new logs replace the oldest logs. #11961 Added: Properties peerKeyString1 and peerKeyString2 on DittoConnection replacing the deprecated properties peer1 and peer2 #12799 Added: Documentation for startSync() and disableSyncWithV3() to include a recommendation for performance improvement. #13098Performance of initial sync when bootstrapping a new peer can be improved by calling disableSyncWithV3() before calling startSync(). Only do this when all peers in the mesh are known to be running Ditto v4 or higher. Added: Documentation for property peerMetadata on DittoPeer to add information about how the property behaves over the lifecycle of the DittoPresenceGraph #13479 Changed: DQL methods now use generics for improved type safety and better IDE support. This change affects the Ditto Store’s methods execute(), registerObserver(), registerObserverWithNextSignal(), its observers field, as well as the related types QueryResult, QueryResultItem, StoreObserver, StoreObservationHandler, and StoreObservationHandlerWithSignalNext. In the Sync class, the method registerSubscription() and the subscriptions field are updated, as well as the related SyncSubscription class. Type generics are added in a backwards-compatible manner by providing default types with wide bounds. Changed: Ditto.runGarbageCollection() is now an async method, which allows awaiting the completion of manual garbage collection. #8743 Fixed: Errors that occur while running manual garbage collection with Ditto.runGarbageCollection() are now thrown. #8743 Fixed: Ditto logger is now initialized when first constructing a Ditto instance, when it used to be initialized on calling init() in browser environments and on import of the SDK in other environments. This fixes an issue where it was not possible to set the logger’s verbosity level before logging began. #12719 Deprecated: Properties peer1 and peer2 on DittoConnection, please use peerKeyString1 and peerKeyString2 instead #127994.8.0 Common Changes
Changed: The Logging output format for Ditto SDKs has been changed in 4.8.0 as part of our process to improve readablility and observability across the Ditto platform. Customers should validate the new data format in their existing data ingestion pipelines.New Logging Schema:YYYY-MM-DDTHH:MM:SS.ssssss LEVEL TARGET: MESSAGE {field1=value1, field2=value2, …}- Timestamp (YYYY-MM-DDTHH:MM.ssssss):
- Format: ISO 8601 format (e.g., 2024-08-16T14:23:05.123456Z).
- Description: The exact time when the log entry was generated.
- Log Level (LEVEL):
- Format: One of the following levels— DEBUG, INFO, WARNING, ERROR.
- Description: Indicates the severity or importance of the log entry.
- Target (TARGET):
- Format: A string, representing the internal module/area
- Description: The source of the log entry, often corresponding to the internal module where the error was called. (e.g. ditto_init or peer_event_listener)
- Message (MESSAGE):
- Format: A human-readable string.
- Description: The main content of the log entry.
- Structured Fields ({field1=value1, field2=value2, …}):
- Format: A list of key-value pairs enclosed in curly braces.
- Description: Any additional structured data associated with the log entry. These fields can include custom data that you attach to the log entry using the tracing::info!(field1 = value1, “Message”) syntax.
4.7.4
ADDED: Support for specifying the mDNS connection ports for Small Peer SDK instances
Allows you to specify a specifc port that can will be used for mDNS announcements and connections on a given device. This can be used for connect with peers across a VLAN while scanning for open ports.Not setting the config will result in the current default behavior of a random port being assigned.If running multiple application on the same device, for example a debug and/or test flight application along side a production application, each application needs to have a unique port.Failure to do this will result in only one application being able to establish connections at a given time.
DQL
tcp_server_bind_mdns_server_port needs to be set before startSync() is called to be applied.
FIXED: A finalizer issue that was causing crashes when closing sync subscriptions (#13849, #13732)
Resolves a race condition that could be hit when closing a sync subscription or stopping sync that caused Ditto to crash.IMPROVED: (Linux) Increased mDNS multicast TTL from 1 to 255 to allow for cross-VLAN announcements (#13590)
To support scenarios with cross-VLAN device discovery we increated the TTL to ensure message have enough time to reach their destination and get acknowledged.4.7.3
FIXED: An issue causing a race condition with a Live Query callback. (#13180)
This fix addresses the issue causing a Live Query callback to receive a delta update, known as a diff, before the initial document.FIXED: A compatibility issue between documents created using different CRDT versions. (#13236)
Previously, there was an issue in which two documents on different internal versions could fail to integrate changes created using an older CRDT version.IMPROVED: Logging for batch write transactions. (#13339, #13339)
Due to a race condition caused by the logging system mistakenly identifying the previous transaction as blocking the current one, the logger would inaccurately indicate the current transaction as being blocked by the previous one from an unknown originator.FIXED: An issue in the Small Peer datastore causing slow performance or process termination. (#13395)
This issue was due to an aging dependency with a race condition, which caused thread tasks to get stuck and transactions to be blocked for extended periods.IMPROVED: The Ditto SDKs compilation performance. (#13174)
We’ve optimized compilation by reducing the size of each binary slice of the Ditto SDKs by 19% and fixing incompatibility with PLCrashReporter.4.7.2
ADDED: mesh_chooser_avoid_redundant_bluetooth system parameter. (#12984)
This new system parameter allows greater control over the use of Bluetooth Low Energy (LE) connections in Ditto’s peer-to-peer mesh network. When set to false, Ditto creates Bluetooth LE connections alongside other peer-to-peer connections, serving as a fallback if the primary transport, such as Apple Wireless Direct Link (AWDL) or LAN, fails.However, before you enable the mesh_chooser_avoid_redundant_bluetooth parameter, consider the following technical tradeoffs:-
Benefits:
- Provides additional fallback to maintain connection stability when primary connections cease to function.
- Reduces time to establish new connections since, by having multiple fallback options, Ditto can more quickly re-establish connections.
-
Drawbacks:
- Increases network traffic since using multiple transports results in additional network overhead
- Using Bluetooth LE alongside other transports increases resource consumption. In the worst case, enabling this setting can result in slower sync performance and battery drain.
CHANGED: The AuthClient by improving the log message for certificate issues returned from the Big Peer Authentication Service. (#13138)
FIXED: A performance-related issue affecting bulk eviction operations for documents with attachments. (#12331)
ADDED: Improved data compression in the handshake protocol when establishing connections to other peers. (#11264)
This allows peers with large permission sets to establish connections on low bandwidth transports like Bluetooth LE more quickly.FIXED: The HTTP protocol by adding content-length: 0 header compliance in empty POST requests. (#12346)
Before, if you invoked an empty POST request, the cloud load balancer would reject your request with a411 - Length Required error message.Now you must explicitly state that the body of your POST request is empty by setting content-length: 0 in the header of your HTTP API call.FIXED: Handling of malformed subscription queries in the legacy query builder API by adding validation logic early to ensure invalid queries are identified early and logged. (#12463)
There was an issue where invoking subscribe() on an invalid query caused sync to be silently disabled.Invalid queries in the subscribe() method are now identified, disabled, and logged as errors.FIXED: Subscription assumption logic so all acknowledgments are processed, regardless of subscription changes. (#12541)
In scenarios where subscriptions rapidly changed back and forth while documents were being concurrently altered, documents would diverge at merge.We’ve removed subscription logic ignoring acknowledgements based on assumed subscription mismatch and introduced salting functionality to ensure each document is unique for each occurrence of a subscription. This helps differentiate between new and reverted subscription states.FIXED: Sync inefficiency where changing a subscription resulted in unnecessary syncing of redundant update files. (#12967)
To eliminate redundant data from being synced unnecessarily, regardless of whether the remote peer previously acknowledged them, we’ve added validation checks ensuring that only unacknowledged data is synced.This fix reduces sync update file sizes, leading to more performant session sync updates, particularly in apps consisting of large, stable subscriptions and infrequent document changes.FIXED: Compatibility issues preventing the React Native SDK from working correctly with older versions of Ditto. (#12641)
This fix ensures the Ditto SDK is compatible with versions of React Native lower than 0.72.FIXED: Blank deviceName property on Ditto instances in React Native apps. (#12661)
4.7.1
Fixed: Misleading errors related to attachment fetch operations. Now, associated error logs are more accurate and clear. (#12409)
Fixed: A specific issue where incorrect sync metadata rollback caused problems with data consistency at merge. (#12422)
Fixed: Potential for a crash when closing a Ditto instance immediately following operations such as setPeerMetadata or setPeerMetadataJSON. (#12351)
Fixed: Potential crash when closing a Ditto instance after calling Ditto.presence.observe() to register a presence observer. (#12388)
Fixed: Premature triggering of asynchronous callback handlers created using observeLocal(). (#12388)
Before this release, there were issues with the timing of callback triggers where the next callback in a live query could trigger before the asynchronous callback handler function had completed its execution.4.7