Skip to content

Graceful stopping of controller#224

Merged
erwinvaneyk merged 3 commits intomasterfrom
controller-ft
Oct 15, 2018
Merged

Graceful stopping of controller#224
erwinvaneyk merged 3 commits intomasterfrom
controller-ft

Conversation

@erwinvaneyk
Copy link
Member

Currently stopping the controller will not await any of the currently running tasks, even though --- most of the time --- these tasks finish in at most a few seconds.

This change adds a graceful stopping feature to the invocation controller, making it wait for the current tasks to finish before fully stopping the controller and related structures.

As a flyby, this PR...

  • reduces the number of evaluations unnecessarily added to the work-queue.
  • changes some naming in the fnenv packages to clarify the function of components.
  • adds documentation to the docs on how to run a local NATS streaming event store.

Closing a GoPool will prevent any new work from coming in, while waiting for a period for the current workers in the pool to finish.
We used to add all evaluations that are not in the workQueue (invocationController) to the workQueue, even those that are currently being evaluated. This led to potentially a lot of unnecesary evaluations being added to workqueue. This change prevents these from being added, by checking whether the evaluations are locked (== being evaluated)
@erwinvaneyk erwinvaneyk merged commit b0ef56e into master Oct 15, 2018
@erwinvaneyk erwinvaneyk deleted the controller-ft branch October 15, 2018 13:58
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 this pull request may close these issues.

1 participant