Write reminders in multiple partitions#3297
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3297 +/- ##
==========================================
+ Coverage 58.50% 59.25% +0.74%
==========================================
Files 84 96 +12
Lines 7611 8482 +871
==========================================
+ Hits 4453 5026 +573
- Misses 2848 3101 +253
- Partials 310 355 +45
Continue to review full report at Codecov.
|
There is a long way to go to make this prod ready. I still need to:
|
|
/ok-to-test |
|
Found the available test cluster - dapr-aks-e2e-08 for linux. Please check the build status. |
|
Found the available test cluster - dapr-aks-e2e-05 for windows. Please check the build status. |
|
End-to-end tests failed on linux. Please check the build logs |
|
/ok-to-test |
|
Found the available test cluster - dapr-aks-e2e-07 for linux. Please check the build status. |
|
Found the available test cluster - dapr-aks-e2e-06 for windows. Please check the build status. |
|
End-to-end tests failed on windows. Please check the build logs |
|
End-to-end tests failed on linux. Please check the build logs |
|
End-to-end tests failed on windows. Please check the build logs |
|
/ok-to-test |
|
/ok-to-perf |
|
Found the available test cluster - dapr-aks-e2e-08 for linux. Please check the build status. |
|
Found the available test cluster - dapr-aks-perf-01. Please wait until test is done. |
|
Found the available test cluster - dapr-aks-e2e-05 for windows. Please check the build status. |
|
Dapr Perf tests failed. |
|
Congrats! All end-to-end tests have passed on linux. Thanks for your contribution! |
|
End-to-end tests failed on windows. Please check the build logs |
|
/ok-to-test |
|
/ok-to-perf |
|
Found the available test cluster - dapr-aks-e2e-07 for linux. Please check the build status. |
|
Found the available test cluster - dapr-aks-perf-01. Please wait until test is done. |
|
Found the available test cluster - dapr-aks-e2e-06 for windows. Please check the build status. |
|
Dapr Perf tests failed. |
Use batch and trx APIs to reminder partitions.
|
/ok-to-test |
|
/ok-to-perf |
|
Found the available test cluster - dapr-aks-e2e-08 for linux. Please check the build status. |
|
Found the available test cluster - dapr-aks-e2e-06 for windows. Please check the build status. |
|
Congrats! All end-to-end tests have passed on linux. Thanks for your contribution! |
|
End-to-end tests failed on windows. Please check the build logs |
| @@ -831,14 +850,102 @@ func (a *actorsRuntime) getReminder(req *CreateReminderRequest) (*Reminder, bool | |||
| a.remindersLock.RUnlock() | |||
|
|
|||
| for _, r := range reminders { | |||
There was a problem hiding this comment.
This for loop might have scaling problems in the future. Suggest considering indices for pre-filtering.
There was a problem hiding this comment.
getReminder() is used only in the CreateReminder() method. Right now, the bottleneck is more in the IO needed to retrieve all reminders for a given ActorType. After we improve throughput from the IO constraints, we will look into in-memory enhancements in this particular path.
On the other hand, I found similar loops in the code where we could improve by indexing per ActorType/ActorId/ReminderName combination.
| } | ||
|
|
||
| if actorMetadata.RemindersMetadata.PartitionCount > a.config.RemindersStoragePartitions { | ||
| log.Warnf("cannot decrease number of partitions for reminders of actor type %s", actorType) |
Description
Split actor reminders storage into multiple keys.
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #2889
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: