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
When new records are added to the scheduler via resonate.lfi or resonate.rfi we check for the existence of a record by id, and return a handle if one exists. If one does not exist we create a record - leading to a possible race condition.
Solution 1: ingest records in scheduler event loop
The event loop is single threaded, so race conditions can be avoided here. We would need to add information to a queue on the scheduler and await a handle. That handle would then be returned to the caller.
Solution 2: lock on the scheduler
We could a lock to the resonate class that must be obtained before lfis/rfis are added to the scheduler. Because we don't have to lock all concurrent calls, we could lock based on the id.
The text was updated successfully, but these errors were encountered:
When new records are added to the scheduler via
resonate.lfi
orresonate.rfi
we check for the existence of a record by id, and return a handle if one exists. If one does not exist we create a record - leading to a possible race condition.Solution 1: ingest records in scheduler event loop
The event loop is single threaded, so race conditions can be avoided here. We would need to add information to a queue on the scheduler and await a handle. That handle would then be returned to the caller.
Solution 2: lock on the scheduler
We could a lock to the resonate class that must be obtained before lfis/rfis are added to the scheduler. Because we don't have to lock all concurrent calls, we could lock based on the id.
The text was updated successfully, but these errors were encountered: