Kotlin
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)
Before this patch release, the documentation incorrectly stated that the return value had to be kept in scope for the fetch to complete. As of this release, the documentation specifies that the return value does not need to be kept in scope.
Previously, your app crashed if the persistence directory was already in use by another Ditto instance. Now, rather than crashing in such scenarios, Ditto throws a DittoError.LockedWorkingDirectoryError error.
Now, you can use this experimental alternative to the original Ditto constructor to prevent crashes when the persistence directory is still in use by another Ditto instance at the time of calling the constructor. Now, rather than crashing in such scenarios, Ditto throws a DittoError.LockedWorkingDirectoryError error. (#11801)
Fixed: Exceptions that occur while creating or fetching attachments now include more details about the underlying cause in their error message for easier debugging. (#12235)
Fixed: An issue that prevented some attachment fetcher events from being delivered to event handlers. (#12331)
Fixed: Closing an attachment fetcher that failed to start downloading no longer results in an exception. (#12490)
Fixed: handling of document-paths containing non-alphanumeric characters. Previous versions may have removed these characters from document-paths. (#12556)
After upgrading to version 4.7 of the SDK, you may notice unexpected errors while using the legacy query builder language. These errors are likely due to invalid field names or path expressions previously undetected.
In addition, make sure to start unquoted_string with an underscore (_), a letter, or an alphanumeric character. For example, the following equivalent regular expression: [A-Za-z_][A-Za-z0-9_]*.
For specific examples, see Query Syntax (Legacy) > Field Path Navigation.
In the legacy query builder language, invalid field names and path expressions now throw explicit errors. Previously these invalid names did not throw and would cause undefined behavior. Note: This new error-throwing behavior applies only to the legacy query builder language; DQL is unaffected by this improvement.
Before this improvement, concurrent write transactions were long-lived, potentially causing deadlocks and request timeouts. Now you'll experience more effective handling of multiple attachments being processed at the same time.
With the latest release, Ditto handles unexpected situations or errors in a way that allows it to recover and continue functioning without crashing or causing disruptions.
This rollout includes new system parameters for the MeshChooser feature for configuring a limited set of variables, allowing you to adjust certain settings during runtime.
The warning message previously logged when peers connected within the mesh is no longer recorded or printed.
Previously, when syncing in mixed mesh environments from Ditto SDK version 4.0.0 of the SDK to version 3.0.0, only partial updates were transmitted. With this release, all updates are transmitted, resulting in greater data consistency and completeness when syncing across different versions of the SDK.
Previously, the Small Peer Info collector would become stuck when attempting to upload logs in certain situations. Since resolving this issue, the Small Peer Info collector functions properly in those conditions.
With this fix, operations related to fetching attachments function as expected.
Fixed: The issue causing type check failures when setting duration parameters through ALTER SYSTEM SET.
When using SystemParameter to configure timeouts before this fix, if using different types to encode the values representing the timeout, for instance, Milliseconds and Seconds, the values failed to downcast, an error log printed, and the new value ignored.
Now, when using mismatched wrapper types, Ditto performs a compatibility check, validates, and, if needed, converts them as appropriate.
Fixed: The deviceName property on Ditto instances now reflects the truncation of the value to 24 bytes when starting sync.
Added: Property connectionRequestHandler to ditto.presence, including related types, allowing filtering of incoming connections from other peers.
Added: Runtime checks and locks to guard against dangling raw Ditto pointer usage in extremely unlucky race condition scenarios.
Fixed: Possible crash while downloading an attachment due to improper decoding of the attachment token.