dapr - v1.6.1
Dapr 1.6.1
Summary
This hotfix release only updates the MongoDB State Store component to address a data serialization problem. An upgrade to this release is only recommended for users of this component.
Runtime
- MongoDB State Store Component: Fixes an issue where actor reminders are broken when using the MongoDB State Store component as actor state store https://github.com/dapr/components-contrib/issues/1355.
- MongoDB State Store Component: Fixes an issue where array values could not be retrieved due to a serialization error.
- MongoDB State Store Component: Fixes an issue where MongoDB internal data types are returned in the State Store API response.
Details
MongoDB Data serialization Problem
Problem
- When using MongoDB as actor state store actor reminders can no longer be loaded or written.
- Array values (e.g.
[{'item1':'value1'},{'item2':'value2'}]
) can not be retrieved via the State Store API. - The JSON response includes unexpected artifacts from the internal BSON representation. For example
{"state":"OR","propertyType":"apartment","id":{"$numberDouble":"1003.1"},"city":"Portland"}
when{"state":"OR","propertyType":"apartment","id":1003.1,"city":"Portland"}
is expected instead.
Root cause
With the introduction of the State Store Query API preview feature in release 1.5.1 data is no longer stored as a string encoded value, but instead as the MongoDB native BSON data types. Not all possible data types were being serialized correctly upon retrieval via the State Store API. Additionally, the internal BSON response was not correctly converted to JSON, thereby including BSON specific data type information in the final JSON representation.
Solution
These issues were resolved with an update to the MongoDB component data retrieval serialization to properly convert from MongoDB BSON to JSON representation, also adding a special serialization step for array values at the top level of the document.
Details
- 🔍View and search all dapr releases.
- 🛠️Create and share lists to track your tools.
- 🚨Setup notifications for major, security, feature or patch updates.
- 🚀Much more coming soon!