Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimerQueueProcessor requires an outside event for first query #454

Closed
samarabbas opened this issue Dec 8, 2017 · 0 comments · Fixed by #455
Closed

TimerQueueProcessor requires an outside event for first query #454

samarabbas opened this issue Dec 8, 2017 · 0 comments · Fixed by #455
Assignees

Comments

@samarabbas
Copy link
Contributor

TimerQueueProcessor sets a very long timer during initialization to notify processor for querying DB. This is problematic in the scenario where a shard restarts then it won't fire any existing timers until a new timer is created for that shard.

@samarabbas samarabbas self-assigned this Dec 8, 2017
samarabbas added a commit to samarabbas/cadence that referenced this issue Dec 8, 2017
TimerQueueProcessor used to setup a very long timer on initialization to
notify processor for doing a DB scan.  This becomes problematic when you
have existing timers and shard restarts.  Now after initialization of
shard there is no trigger for the processor to perform a DB scan.  It
now has to wait for a trigger from outside to perform the first scan so
it can start operating as usual.
This change removes the infite timer on initialize to perform first scan
immediately to check for existing timers.
Also some code cleanup and removing some unnecessary code.

fixes cadence-workflow#454
samarabbas added a commit that referenced this issue Dec 9, 2017
* TimerQueueProcessor to scan DB for exisiting timers on init

TimerQueueProcessor used to setup a very long timer on initialization to
notify processor for doing a DB scan.  This becomes problematic when you
have existing timers and shard restarts.  Now after initialization of
shard there is no trigger for the processor to perform a DB scan.  It
now has to wait for a trigger from outside to perform the first scan so
it can start operating as usual.
This change removes the infite timer on initialize to perform first scan
immediately to check for existing timers.
Also some code cleanup and removing some unnecessary code.

fixes #454
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant