dapr / dapr/components-contrib

CosmosDB reminder partitioning not storing reminders in partitions

Open
#3,380 6 comments 12 reactions 0 assignees View on GitHub
kind/bug P1 pinned
Dominant language
Go
Stars
602
Forks
580
Avg merge
4d 9h
Merged PRs (30d)
6

Description

When using CosmosDB as actor state store with reminder partitioning enabled, the reminders are not stored in the partitions anymore since runtime version 1.10.5 (v1.10.4 or lower is working correctly).

## Expected Behavior

Actor reminders should be stored in partitions to optimize performance with CosmosDB.

## Actual Behavior

The actor reminders are stored in a single CosmosDB document, causing high RU usage when many reminders are used.

## Steps to Reproduce the Problem

I have created a sample project that demonstrates the bug:

https://github.com/arnoldpistorius/bug-dapr-cosmosdb-partitioning

Basically the steps are:

- Configure CosmosDB Container as actor state.
- In SDK enable actor reminder partitioning (eg. 3).
- Create a bunch of reminders through an actor.
- Observe the CosmosDB container's contents.
- All reminders are stored in the same document
- 2 different partitions were made, but both not used
- After service restart additional partitions are made and some data is migrated, but still new reminders come in a single document.

When the same scenario is done using Redis as actor state store, the partitioning is working as expected.

## Release Note

RELEASE NOTE:

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.