BROOKLYN-273: restart() calls pre-launch & post-launch#149
Merged
asfgit merged 3 commits intoapache:masterfrom May 24, 2016
Merged
BROOKLYN-273: restart() calls pre-launch & post-launch#149asfgit merged 3 commits intoapache:masterfrom
asfgit merged 3 commits intoapache:masterfrom
Conversation
Previously for MapConfigKey, the getNonBlocking would always return null. This could badly impacted VanillaSoftwareProcess, where `VanillaSoftwareProcessSshDriver.getInstallLabelExtraSalt` would call this for SHELL_ENVIRONMENT. The shell env was therefore not included in the hash.
Previously if download-url or install-command was blank, it would not continue to look at shell-env for computing the salt for the install dir.
| public <T> Maybe<T> getNonBlocking(ConfigKey<T> key) { | ||
| public <T> Maybe<T> getNonBlocking(final ConfigKey<T> key) { | ||
| if (key instanceof StructuredConfigKey || key instanceof SubElementConfigKey) { | ||
| return getNonBlockingResolvingStructuredKey(key); |
Member
There was a problem hiding this comment.
Could use this implementation for both cases to simplify.
Contributor
Author
There was a problem hiding this comment.
@neykov I wondered about using the same impl, but the problem is getNonBlockingResolvingStructuredKey isn't a great implementation. If the thread executing the resolving task is starved, then it could timeout even though the underlying task was not blocked. In contrast, the other code-path will first check if the value needs resolved in a special way. If it does not, it will just return the value directly. It is therefore more reliable!
Member
|
LGTM, merging |
asfgit
pushed a commit
that referenced
this pull request
May 24, 2016
Contributor
|
@aledsage @neykov |
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.
No description provided.