Skip to content

Dapr Runtime v1.6.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@dapr-bot dapr-bot released this 28 Mar 17:14
· 2337 commits to master since this release
2fa6bd8

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 dapr/components-contrib#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.