Fix running tracks across multiple load driver machines#1763
Merged
b-deam merged 5 commits intoelastic:masterfrom Aug 22, 2023
Merged
Fix running tracks across multiple load driver machines#1763b-deam merged 5 commits intoelastic:masterfrom
b-deam merged 5 commits intoelastic:masterfrom
Conversation
pquentin
approved these changes
Aug 17, 2023
Member
pquentin
left a comment
There was a problem hiding this comment.
Wow, that's a nice catch! I left a small nit about naming.
esrally/driver/driver.py
Outdated
Comment on lines
+1218
to
+1220
| self.driver_actor = sender | ||
| # load node-specific config to have correct paths available | ||
| self.cfg = load_local_config(msg.config) |
Member
There was a problem hiding this comment.
Do we really need to attach those to self? If we do we should set them to None in __init__ but it looks they're only used locally.
Additionally, I think having both cfg and msg.config is confusing. What do you think about node_config instead of cfg?
Member
Author
There was a problem hiding this comment.
Good points! I refactored these attributes in 34566f1 as I noticed we were needlessly setting the config twice otherwise.
Member
Author
|
buildkite test this please |
Member
Author
|
Hmm, there's some race condition here related to multiple workers on the same host all loading the track (i.e. running git operations) in parallel: I'll work out a fix. |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This commit adds a 'new'
Bootstrapmessage handler to theWorkeractor, which is responsible for ensuring that the new actor has the correct configuration and track modules loaded into its system path. This restores the ability to run tracks across multiple load driver machines.The reason tracks worked across
Workeractors on coordinator machine (where the race was invoked) is because the default behaviour for new actors created withmultiprocTCPBaseis that they fork (in the Unix sense) from their parent process. When a process is forked, it inherits the memory and other properties from the parent, including the system path.When a new
Workerwas created on a remote load driver machine the existing parent was missing paths, meaning there were missing modules for the load path.Notes:
receiveMsg_RallyConfigthat was unused, meaning it was unlikely this ever workedFixes #1752
Relates #1206