Skip to content

Commit

Permalink
Fix nasa#950, race condition in control request
Browse files Browse the repository at this point in the history
Because the process of handling a control request involves
calling other subsystems, the ES lock needs to be released.
However, this also means that the app record can change state
for other reasons, such as the app self-exiting at the same
time.

To avoid this possibility, process in two phases:

First assemble a list of tasks that have timed out
and need to be cleaned up, while ES is locked.

Next actually perform the cleanup, while ES is unlocked.
In areas during cleanup that need to update the ES global,
the lock is locally re-acquired and released.
  • Loading branch information
jphickey committed Oct 21, 2020
1 parent af0f536 commit 6a360e2
Show file tree
Hide file tree
Showing 4 changed files with 516 additions and 345 deletions.
Loading

0 comments on commit 6a360e2

Please sign in to comment.