Add pause between stopping/starting runtime#526
Conversation
ActorReminderRecoveryIT and ActorTimerRecoveryIT both rely on reminders/timers being persisted when dapr restarts. On some restarts, it appears that the placement service shares its placement table during on ongoing update. This causes the dapr runtime to use the wrong address for the actor. dapr#425
Codecov Report
@@ Coverage Diff @@
## master #526 +/- ##
=========================================
Coverage 80.59% 80.59%
Complexity 976 976
=========================================
Files 88 88
Lines 3015 3015
Branches 331 331
=========================================
Hits 2430 2430
Misses 420 420
Partials 165 165 Continue to review full report at Codecov.
|
|
why is it 10 seconds? will it vary in different environments? |
Admittedly it's fairly arbitrary. The issue here is that what we're waiting to propagate is information that exists inside the runtime itself. This information isn't available to the Java SDK (nor should it be). Since we can't access the required state, I don't think there's anything we could really gate on. The library looks useful though. For context I did at first try and do something similar where I would wait and ensure the app started responding again. The issue with this was that in this state, the continued requests to the actor would cause it to be held in memory longer so there'd have to be some arbitrary wait time regardless. |
I like the awaitility project - we should use this in our test project here. Like Hal said, this is to avoid a race condition in the runtime where the state is not exposed. @halspang please, create an issue in dapr/dapr - we should not have to wait to restart. |
ActorReminderRecoveryIT and ActorTimerRecoveryIT both rely on reminders/timers being persisted when dapr restarts. On some restarts, it appears that the placement service shares its placement table during on ongoing update. This causes the dapr runtime to use the wrong address for the actor. dapr#425 Signed-off-by: zjx244729 <zjx244729@alibaba-inc.com>
Description
ActorReminderRecoveryIT and ActorTimerRecoveryIT both rely on reminders/timers being persisted when dapr restarts. On some restarts, it appears that the placement service shares its placement table during on ongoing update. This causes the dapr runtime to use the wrong address for the actor.
Placement service logs:
When this interleaving happens, the error message received references the actor with the port that was being removed. This implies that the table isn't being updated appropriately and the runtime gets the old port. When the actor is receiving continuous calls, the placement service does not update the location as it believes the actor is busy.
Issue reference
Closes: #425
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: