Release Notes
Swift
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) 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 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 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 dql 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 more quickly establish connections on low bandwidth transports like bluetooth le 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 fixed the authentication mechanism against webhook providers for ios and mac devices (#13160) before this fix, ios and mac randomly failed to authenticate against a webhook provider with an error traced to the provider nsstring not being kept alive for the duration of the login request, leading to authentication failure and resulting in an error message stating "no auth config set up " the fix involved guaranteeing that the provider nsstring persists for the duration of the dispatched login request, preventing premature deallocation of the string 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 inconsistency in error logging and code translation for newattachment and fetchattachment operations so errors previously recorded at the error level are now recorded at the debug level instead (#12235) fixed errors that occur while creating attachments are now logged at the error level previously, they were logged at the debug level (#12235) 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 added a log message warning for devicename changes after sync start (#11160) we've added a warning message that logs when the devicename property is set after the sync process has started previously, setting devicename of a ditto instance after starting sync did not trigger a warning this new message warns you that the new value you've set only takes effect after you've restarted the sync process in your app fixed the devicename property on ditto instances now reflects the truncation of the value to 24 bytes when starting sync (#11160) added properties peermetadata and identityservicemetadata to dittopeer (#11611) added property connectionrequesthandler to ditto presence , allowing filtering of incoming connections from other peers (#11611) added property peerkeystring to dittopeer as a replacement for the now deprecated peerkey ( #11611) deprecated the property peerkey for dittopeer ; use the new peerkeystring property instead (#11611) fixed transportconfig retry interval (#12157) due to an issue in the transportconfig , the retry connection interval was incorrectly set in seconds instead of milliseconds this fix corrects the interval to properly use milliseconds instead of seconds