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

Change flush to execute once per host #112

Merged
merged 4 commits into from
Jun 15, 2021
Merged

Change flush to execute once per host #112

merged 4 commits into from
Jun 15, 2021

Conversation

Shillaker
Copy link
Collaborator

@Shillaker Shillaker commented Jun 14, 2021

Flushing is a one-off host-wide task that needs to be called after all the executors have terminated. However, flushing was previously implemented as an instance method on the Executor, meaning it was unnecessarily called repeatedly and wouldn't actually get called if there were no executors present. Therefore I've moved it to a method on the ExecutorFactory (which is a singleton), so it now gets called once per host.

@Shillaker Shillaker self-assigned this Jun 14, 2021
@@ -66,9 +66,6 @@ void FunctionCallServer::recvFlush(faabric::transport::Message& body)

// Clear the scheduler
scheduler.flushLocally();

// Reset the scheduler
scheduler.reset();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scheduler reset gets called in flushLocally

Copy link
Collaborator

@csegarragonz csegarragonz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. However, the dummy tests look indeed a bit dumb. Maybe not in this PR, but is there a way we could actually test the issue reported in faasm/faasm#381 ? Maybe in the distributed tests?

I've also ran into the same issue myself after the issue was closed.

@Shillaker
Copy link
Collaborator Author

LGTM. However, the dummy tests look indeed a bit dumb. Maybe not in this PR, but is there a way we could actually test the issue reported in faasm/faasm#381 ? Maybe in the distributed tests?

I've also ran into the same issue myself after the issue was closed.

All the complexity around flushing is in Faasm so that's where the tests should be. It's a good point re. that issue and it's something that's been hanging around for a while. A more rigorous distributed test in Faasm would be good.

@Shillaker Shillaker merged commit 253c4c6 into master Jun 15, 2021
@Shillaker Shillaker deleted the flush-once branch June 15, 2021 12:06
csegarragonz added a commit that referenced this pull request Jun 16, 2021
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.

2 participants