Kotlin
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 Kotlin/Java Specific Changes
Fixed: Crash on WiFi Aware stalling and Ditto being re-created (#14423)
Fixed: Crash on Android after logout (#14562)
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 Kotlin/Java Specific Changes
Fixed: Crash in WiFi Aware when registering network publisher callback (#14013)
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 Kotlin/Java Specific Changes
Added: Method exportToFile() to DittoLogger, 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: Synchronous method exportToFileBlocking() to DittoLogger for Java callers.
Added: A new getter and setter for Presence.connectionRequestHandler which take a DittoConnectionRequestHandlerCallback, making the API much easier to call from Java. (#12770)
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. (#13098)
Performance 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)
Added: optional hint parameter to upsert() on DittoCollection and DittoScopedWriteTransaction. By providing a hint you can better track the source of blocked write transactions (#7110)
Changed: Android Wifi Aware internal logic to avoid duplicate attempts to create the network and speed up time to successful connection (#12458)
Changed: Improve Android WifiAware stability by actively terminate when the application goes into the background and resume when the application comes back to the foreground (#12804)
Changed: Improve staleness detection in Android Wifi Aware leading to a more reliable connection. (#12866)
Changed: API docs no longer include unintentially exposed protected members. (#13200)
Changed: (Linux&Android) Increased mDNS multicast TTL from 1 to 255 to allow for cross-VLAN announcements (#13590)
Changed: Slow or blocked write transactions now log hints showing the waiting and blocking transactions (#7110)
Fixed: The SDK will no longer crash when it observes malformed mDNS traffic (#12396)
Fixed: The SDK will no longer crash when multiple threads call stopSync() (#11554)
Deprecated: Properties peer1 and peer2 on DittoConnection, please use peerKeyString1 and peerKeyString2 instead (#12799)
Deprecated: Property queryOverlapGroup on DittoPeer and DittoRemotePeerV2, always return 0 going forward. Query Overlap Groups was an experiemental feature that has been removed after it was determined this would not support production scenarios. (#13215)
Removed: delete(), swigReleaseOwnership() and swigTakeOwnership() methods from DittoLogger. These are internal memory management APIs that were unintentially exposed and can cause memory leaks or crashes if used (#12617)
Removed (Experimental): property queryOverlapGroup of DittoExperimental
Removed (Experimental): method setPriorityForQueryOverlapGroup() from DittoExperimental. (#13215)
Removed (Experimental): deprecated methods setQueryOverlapGroup(queryOverlapGroup:) and setPriority(_:forQueryOverlapGroup:ditto:) of DittoExperimental
4.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 and earlier Logging Format Example
[INFO] 2024-08-02T10:25:39.981Z: AuthClient: using cached SiteId; site_id = 16248337916605943930
4.8.0 and later Logging Format Example
2024-08-02T11:32:25.905562+01:00 INFO ditto_init:new_auth_client: ditto_auth: using cached SiteId site_id=16248337916605943930
Added: DQL support for string functions byte_length and char_length #12147
Added: DQL support for inline object and array literal creation #12312
Added: object_length and deserialize_json functions in DQL #12605
Added: DQL INSERT statements support inlining the construction of an object #12761
Added: Remote query capability allows Big Peer to execute read-only queries on Small Peers. Usagne currently internal to Ditto Customer Experience team members #12268
Added: Diagnostics are now provided when collecting Small Peer Info on-disk logs #12080
Added: output version, sdk and build information on startup for easier debugging #12845
Added: Introduced new internal capabilities ensure a large data payload (e.g. a large attachment file) cannot use all the bandwidth and prevent other data from being synced.
Added: mDNS transport can now be configured with a static port for the TCP server using the tcp_server_bind_mdns_server_port system parameter #13442
Changed: New logging format that includes detailed information #10794
Changed: The Ditto logger is now more verbose by default, with a minimum log level of INFO instead of WARNING #11141
Changed: small peer info collection is now enabled by default and its default sync scope is now BigPeerOnly #12709 (Device dashboard will populate information automatically)
Changed: (Experimental) Multihop connections are formed more efficiently, e.g., for Ditto Bus. This is an incompatible protocol change from previous versions #12108, #12623
Changed: Improve performance by avoiding deserializing the entire Document if only part of it is required #10887
Changed: Attachments now sync independently of documents, improving rainbow connection efficiency #11156
Changed: Updating several depdencies for security patching (Patch multiple old packages #12087)
Changed: How network OS capabilities are internally linked into the library to allow for more relaiable and reusable internal logic #12362
Changed: API documentation for execute method to include information about its interaction with sync subscriptions #12365
Changed: Default to creating backup Bluetooth connections when there is an existing WiFi connection (Default mesh_chooser_avoid_redundant_bluetooth to false #13398)
Changed: console logging will now output to STDERR instead of STDOUT ([logs] logging now outputs to STDERR instead of STDOUT #13477)
Fixed: Bytes and Arrays not being always comparable in the legacy query language #10887
Fixed: Legacy query language casting counters and maps with tombstones to the wrong boolean value #10887
Fixed: Lowered the log level of a few SQLite3 notices that were being unnecessarily logged as warnings #12032
Fixed: A crash that can occur if a DQL query contains a multi-byte character #12324
Fixed: An issue with the transports multiplexer that could lead to a hung process. This occured when dealing with large messages spanning multiple chunks (>64KB) #12428
Fixed: A rare edge case that could slow down data sync betten peers #12527
Fixed: Frequent subscription changes along with eviction calls could cause failure to converge on data leading to inconsistent data state #11431
Fixed: Memory leak in third party library used for peer-internal messaging #12895
Fixed: Transport inactive connection tracking no longer stores identifiers indefinitely. This could lead to a slow growth in memory consumption for long lived applications (~ 1MB/day on transports with high rate, unreliable discovery - such as BLE) #13147
Fixed: Unexpected failures to obtain a certificate for peer-to-peer sync are now logged at ERROR level instead of WARNING #13323
Removed: (Experimental) Ditto no longer supports the experimental Query Overlap Groups feature and support has been removed. This experimental feature has been removed after running a determining a lack of feasability in production scenarios. The team is iterating and plan on interoducing improved capabilitites. #13075
Was this page helpful?