C# Release Notes
4.10.5 C++ Specific Changes
Fixed: Windows devices failed to connect to Android on LAN (#17199)
Fixed: Bluetooth connectivity on Apple devices works when background Bluetooth permissions are missing. (#17065)
Fixed: A rare crash on Android devices when shutting down Bluetooth. (#17069)
Fixed: hard crash on Android 10 Bluetooth (#17073)
Fixed: stopSync
does not properly terminate WiFi Aware connections (#17235)
4.10.5 Common Changes
No Specific Changes
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
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.
SDK>Configuring Collection Sync
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 Syntax for setting a Sync Scope
Example Setting A Sync Scope in the SDKs
In the example below we’ll set the collection 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.g ditto.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 Support for LIKE
operator
The LIKE
operator can now be used for pattern matching of string values.
DQL>Operator Expressions
Pattern | Meaning |
---|---|
% | Matches zero or more characters (like .* in regex) |
_ | Matches exactly one character (like . in regex) |
Example
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
.
DQL>Operator Expressions
DQL LIMIT/ OFFSET / ORDER BY support for mutation operators
Users can now use LIMIT
, OFFSET
and ORDER BY
in EVICT
and UPDATE
statements.
DQL Example
4.10.0 C# Specific Changelog
Added
Added
- Added:
customAuthUrl
parameter to DittoOnlinePlayground identity. (#15745)
Fixed
Fixed
- DittoLogger API docs and ensured it is included in the API Reference page. (#15796)
- Repeated reads of a document within an ID-specific transaction scope of the query builder API now reflect changes made in the same transaction. (SDKS-245)
- (Experimental) Bus API correctly falls back to multihop connectivity if a direct connection is lost. (#15670)
4.10.0 Common Changelog
Added
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)
-
object_keys and object_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 ([network] Add configurability for switching between legacy & next gen networking 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
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
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)