stopSync
does not properly terminate WiFi Aware connections (#17235) Added: system parameters to enable/disable WiFi Aware client/server (#17314) Fixed: crash on startup on devices running Android 8.1 and below (#17460)DQL Strict Mode
DQL_STRICT_MODE=false
), Ditto is more flexible and will infer the CRDT type based on the document’s shape:Differ
API for calculating diffs between query results.
This API can be used with a store observer to understand how its results change
over successive callbacks. The Differ
API provides a way to track changes in
the data and can be used to optimize data synchronization and conflict resolution.Differ API documentation.Feature | Description | Example |
---|---|---|
UNSET clause | Remove fields from documents | UPDATE orders UNSET items.abc WHERE _id = 'my-id' |
CAST function | Explicitly convert between data types | SELECT * FROM products WHERE CAST(price AS INT) > 10 |
USE IDS clause | Direct document retrieval by ID | SELECT * FROM products USE IDS '123', '456' |
SIMILAR TO | Pattern matching expressions | SELECT * FROM products WHERE name SIMILAR TO '%phone%' |
Runtime expressions | Use expressions in object/array construction | UPDATE products SET metadata = { 'updated_at': current_timestamp() } |
Counters | Support for legacy compatible counter type | UPDATE products APPLY in_stock PN_INCREMENT BY 1.0 |
->
) are deprecated. Read more.DELETE
to remove documents.DQL_STRICT_MODE
as a system parameter to opt-out of requiring collection definitions (#16573)network_use_nextgen_multihop_stack
(#16370)DittoTransaction
representing an active DQL transaction. (#15873) Added: DittoTransactionInfo
encapsulating information about a transaction. (#15873) Added: Method transaction()
on DittoStore
allowing a DQL transaction to be performed. (#15873) - DittoTransactionCompletionAction
representing an action to be taken upon the completion of a transaction: commit or rollback. (#15873) Added: An opt-in Android foreground service which allows Ditto to sync in the background. (#16097) Added: The new DittoDocumentPath::number
and DittoDocumentPath::numberValue
accessors. (#16776) Fixed: transport config changes that are made directly on the DittoTransportConfig
object that a Ditto
instance references are now applied when startSync
is called. (#16835) Fixed: WiFi Aware occasional failure to start advertising (#16844) Fixed: Transaction hints in log messages from calls to upsert()
included $name
instead of the actual collection name. (#SDKS-1012) Added: class DittoDiffer
, which calculates diffs between query results. This can be used with a store observer to understand how its results change over successive callbacks. (SDKS-981) Added: class DittoDiff
to represent diffs produced by the DittoDiffer
. (SDKS-981) Changed: Unify dedicated TCP servers across different transports (Multicast, mDNS, and WiFi Aware) by utilizing a single static TCP server implementation (#TRANS-131)DittoTransportConfig
object that a Ditto
instance references are now applied when startSync
is called. (#16835) 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)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
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. |
local_mesh_orders
to only sync with other small peers in the mesh and not with Ditto Serverusing the SmallPeersOnly
sync scope.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
LIKE
operatorLIKE
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) |
object_keys(object)
: Returns an array
with all the keys in the given object
.object_values(object)
: Returns an array
with all the values in object
.DQL>Operator Expressions
LIMIT
, OFFSET
and ORDER BY
in EVICT
and UPDATE
statements.DQL ExampletriggerTestPanic
method on DittoExperimental
to intentionally trigger a panic in the Ditto Core for testing purposes. (#15408)DittoStoreObserver
and DittoSyncSubscription
. (#SDKS-563)DittoAddress.siteId
. Use PeerKeyString instead. (#SDKS-589)DittoBase.siteId
. Use PeerKeyString instead. (#SDKS-589)DittoIdentity.OfflinePlayground.siteId
. Use PeerKeyString instead. (#SDKS-589)DittoIdentity.SharedKey.siteId
. Use PeerKeyString instead. (#SDKS-589)object_keys
and object_values
scalar DQL functions. (#QE-73)
NullPointerException
bug introduced in 4.9.0
please use 4.9.2
or later.ALTER SYSTEM
and the tcp_server_bind_mdns_server_port
config.ditto.store.execute(...)
command within your application.tcp_server_bind_mdns_server_port
needs to be set ***before ***startSync()
is called to be applied.DittoSubscription
that contained a sort()
clause. (#13394)sort()
in sync subsriptions with the legacy query builder would result in a crash.unknown
originator.PLCrashReporter
.JVMBased
in the Device Dashboard instead of Unknown
. (#13251)gatt must not be null
. (#13411)mesh_chooser_avoid_redundant_bluetooth
system parameter. (#12984)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:mesh_chooser_avoid_redundant_bluetooth
parameter, use the following DQL query:
ALTER SYSTEM SET mesh_chooser_avoid_redundant_bluetooth = false
AuthClient
by improving the log message for certificate issues returned from the Big Peer Authentication Service. (#13138)content-length: 0 header
compliance in empty POST
requests. (#12346)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.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.warn
log noise. (#12674)mdns
to handle reverse DNS lookup queries. (#13000)mdns
no longer fails to connect in specific network configurations. Ditto.sdkVersion
.DittoError.LockedWorkingDirectoryError
error. DittoError.LockedWorkingDirectoryError
error. (#11801)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_]*
.is_connected_to_big_peer
field from the Small Peer Info document. (#11883)ATTACHMENT
data type, reducing potential timeouts. (#11893)MeshChooser
feature for configuring a limited set of variables, allowing you to adjust certain settings during runtime.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.peerMetadata
and peerMetadataJsonString
to ditto.presence
.identityServiceMetadata
to DittoPeer.peerKeyString
to DittoPeer
as a replacement for the now deprecated peerKey
.