Release Notes
Java
4 7 4 version release 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 setting the config the config can be set using dql alter system and the tcp server bind mdns server port config dql alter system set tcp server bind mdns server port to 1234 this command should be run using the ditto store execute( ) command within your application tcp server bind mdns server port needs to be set before startsync() is called to be applied let result = await ditto store execute(query "alter system set tcp server bind mdns server port to 1234")val result = ditto store execute("alter system set tcp server bind mdns server port to 1234")const result = await ditto store execute("alter system set tcp server bind mdns server port to 1234");dittoqueryresult result = (dittoqueryresult) ditto store execute( "alter system set tcp server bind mdns server port to 1234", new continuation<>() { @nonnull @override public coroutinecontext getcontext() { return emptycoroutinecontext instance; } @override public void resumewith(@nonnull object o) { if (o instanceof result failure) { // handle failure } } } );var result = await ditto store executeasync("alter system set tcp server bind mdns server port to 1234");auto result = ditto get store() execute("alter system set tcp server bind mdns server port to 1234") get();let result = ditto store() execute("alter system set tcp server bind mdns server port to 1234", none); dart(beta) final result = await ditto store execute("alter system set tcp server bind mdns server port to 1234"); fixed a finalizer issue that was causing crashes when closing sync subscriptions (#13849, #13732, #13738) resolves a race condition that could be hit when closing a sync subscription or stopping sync that caused ditto to crash improved (linux/android) 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 fixed intermittent crash when finalizing a legacy dittosubscription that contained a sort() clause (#13394) resolves and issue where using sort() in sync subsriptions with the legacy query builder would result in a crash fixed included necessary symbols so that ditto core crashes can be properly symbolicated with crash reporters (#13696) previously not all symbols were being included in the package bundle and this led to crashes not being able to be symbolicated and ultimately made readable now the kotlin bundle includes the correct packages the extra symbols slightly increase the bundle size if this additional size is an issue for your application, we recommend stripping these symbols when compiling your production build however, please note that stripping symbols will make crash reports in production unreadable, which could lead to longer resolution times for live site incidents 4 7 3 version release 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 fixed kotlin and java android devices now appear as jvmbased in the device dashboard instead of unknown (#13251) fixed an issue causing a crash with the message gatt must not be null (#13411) 4 7 2 version release 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 to enable the mesh chooser avoid redundant bluetooth parameter, use the following dql query alter system set mesh chooser avoid redundant bluetooth = false 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 a 411 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 changed reduced bluetooth le warn log noise (#12674) changed handle reverse dns lookup queries in android mdns to avoid mdns failing to connect in specific network configs changed android mdns to handle reverse dns lookup queries (#13000) by adding reverse dns lookup queries, android mdns no longer fails to connect in specific network configurations fixed wi fi aware so it is available on api level 32 (#12631) fixed missing version metadata (#12843) now version metadata is correctly included in the string returned from ditto sdkversion 4 7 1 version release 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 the documentation for the dittostore fetchattachment api method (#11783) 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 added dittoexperimental constructdittofailable() api method (#11801) 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 added dittoexperimental constructdittofailable() api method 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) 4 7 version release fixed the legacy query language error throwing mechanism to accept invalid field names properly (#11888) 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 docid\ v350qeq b6vj06pcxc3zn 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 removed the is connected to big peer field from the small peer info document (#11883) changed the small peer info json metadata by increasing the depth limit to 64 levels (#11891) improved transaction contention time for the attachment data type, reducing potential timeouts (#11893) 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 fixed the issue causing sync crashes due to missing update files (#11952) 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 added parameters for adjusting certain settings during runtime 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 resolved the warning message when peers connect is no more (#11977) the warning message previously logged when peers connected within the mesh is no longer recorded or printed improved sync performance by sending the entire state of the data (#12029) 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 fixed the issue causing the small peer info collector to become stuck (#12051) 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 fixed the issue causing fetch operations to appear unresponsive (#9501, #12067) 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 (#12070) 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