Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

csegarragonz
Copy link
Collaborator

@csegarragonz csegarragonz commented Nov 25, 2021

In this PR I fix a race condition that happened when running Scheduler::getFunctionExecGraph() immediately after Scheduler::getFunctionResult() in a distributed setting.

In particular, we sometimes generated the execution graph before all remote executors had published their resulting message. As a consequence, redis.get would return an empty byte array, and we'd cast it to an empty faabric::Message.

I add a naive retry mechanism (bear in mind generating execution graphs is off the hot path), and a test that reproduces the failure with very little retries (in fact 10 tries might be an overkill).

@csegarragonz csegarragonz added the bug Something isn't working label Nov 25, 2021
@csegarragonz csegarragonz self-assigned this Nov 25, 2021
REQUIRE(node.msg.id() == req->mutable_messages()->at(i).id());
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This test isn't checking that it will fail when the max retries are hit, which seems like the easier case to check for.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I add another test that checks that you can't get an execution graph for a message that hasn't been published.

@csegarragonz csegarragonz merged commit dba98f1 into master Nov 30, 2021
@csegarragonz csegarragonz deleted the redis-get-retry branch November 30, 2021 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants