C#
Ditto introduced an experimental feature for retrieving, configuring, and restoring default configurations for the Ditto peer-to-peer system at runtime using Ditto Query Language (DQL) syntax.
The Customer Experience team offers this feature to customers when appropriate for your scenario and use case.
Through two new statements:ALTER SYSTEM and SHOW, you can change parameters, settings, and configurations while your peer-to-peer system is actively running.
Due to recent improvements to the sync protocol, Small peers no longer accumulate unsubscribed documents when subscription statuses are changed.
This fix ensures that the peer-to-peer system prevents retaining unnecessary data, resulting in optimized resource usage.
Ditto's recent adjustments to the sync protocol have decreased the exchange of redundant data during re-synchronization, improving the efficiency and stability of the sync process.
Ditto decoupled sync protocol from conflict-free replicated data types (CRDTs) so peers now prioritize using the latest supported protocol version for data exchange.
Even if your app uses legacy CRDTs, you'll benefit from this backward-compatible change.
The documentation for the sort() API method on cursor operations has been updated to provide clearer explanations of behavior in cases where the specified field for sorting is missing.
Now, parser error messages focus more on indicating the location of errors within the input code, rather than suggesting potential fixes.
With this improvement to the API reference, you have better guidance in debugging your code.
This fix addresses a specific bug where Ditto Link could go into a "forever loop" under certain conditions. This loop, caused performance issues and could potentially lead your app crashing.
Before this fix, there were issues with incorrect casting to boolean values, leading to inconsistent behavior. This update ensures that values are cast properly, resulting in consistency across your app.
If you're using legacy CRDTs in your app, now you can perform comparisons with ATTACHMENT objects.
Previously, DQL queries were limited in their ability to retrieve the pointer that Ditto uses to fetch your ATTACHMENT object.
Now you can query the following additional fields to improve query capabilities:
Detail | Description |
---|---|
Attachment ID | A cryptographic hash of the attachment's contents. (See Organizing by ID and Attachment Token) |
Metadata | Additional information about the attachment, such as its name, type, and so on. (See Attachment Token) |
Blob Length | The size of the blob data in terms of length (len) in bytes. (See Blob Store) |
Following is an example document showing the fields added in this release:
We've improved error handling mechanisms to manage input-output (IO) errors that may result during the creation of ATTACHMENT objects.
Now you'll receive clearer feedback when encountering errors so you can prevent potential crashes and improve the overall stability of your app.
Fixed: Improved internal data decoding functions to prevent API crashes under certain inputs:
We've improved the software component for handling tasks such as byte parsing, character decoding, and data type conversion. Instead of crashing, like before, the API returns an error.
There were issues causing app crashes during the preparation phase for syncing data to remote peers.
With these improvements, the likelihood of encountering errors during syncing has been significantly reduced.
Previously, you'd create attachments using a method in the Collection class, which has since been deprecated and replaced with the Store context.
New Method for Creating Attachments
This release rolls out a replacement class with a new API method for creating ATTACHMENT objects.
new_attachment()
This new way comes with improvements, such as asynchronous execution. Meaning, it does not block your main thread.
New Mechanism for Handling Fetching-Related Errors
If there are any issues fetching attachments, the fetch_attachment() method now throws DittoError.
New Document Field Properties for Identifying Attachments
Added the following methods to the AttachmentToken class to increase the efficiency of fetching operations in your app:
Method | Property Retrieved |
---|---|
get_id() | A cryptographic hash of the attachment's contents. |
get_metadata() | Additional information about the attachment, such as its name, type, and so on. |
get_len() | The size of the blob data in terms of length (len) in bytes. |
Previously, when initializing TCP and HTTP transports, the default bind IP address was set to IPv4's "any" address, represented as 0.0.0.0.
We've shifted to IPv6's "any address," aligning us with modern network standards.
We fixed an issue related to the structure representing attachment tokens provided by the value() of DittoQueryResultItem so that the schema accurately represents the content of attachment tokens.
The token is now provided as a MAP of the form {{"id", "..."}, {"len", 123}, {"metadata", ...}} where metadata is a map<std::string, std::string>.