You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should QuartzSchedulerExtension be made thread-safe?
My understanding is that Akka extensions must normally manage thread-safety internally. At the moment, I think that it is possible for concurrent access to createSchedule to result in a created schedule being lost if the reads, updates and writes occurring in schedules += (name.toUpperCase -> quartzSchedule) are interleaved - causing a subsequent call to schedule to fail.
Thanks,
-Dan
The text was updated successfully, but these errors were encountered:
QuartzSchedulerExtension must be thread-safe.
That's not the only problem, runningJobs is mutable.Map, but not Concurrent, so it's quite simple to get NPE.
I tried to find possibility to remove schedules after restart and found that this library is dangerous to use. So the only way to use it now is to use it from the single actor.
arhathq
pushed a commit
to arhathq/akka-quartz-scheduler
that referenced
this issue
Mar 29, 2017
* Thread safety fix for the issue #33
* Simplify code
* Don't uppercase the schedule name
* use TrieMap
* optimize imports
* code style
Co-authored-by: Alexander Kuleshov <oleksandr.kulieshov@globoforce.com>
Hi,
Should
QuartzSchedulerExtension
be made thread-safe?My understanding is that Akka extensions must normally manage thread-safety internally. At the moment, I think that it is possible for concurrent access to
createSchedule
to result in a created schedule being lost if the reads, updates and writes occurring inschedules += (name.toUpperCase -> quartzSchedule)
are interleaved - causing a subsequent call toschedule
to fail.Thanks,
-Dan
The text was updated successfully, but these errors were encountered: