Fix concurrency issue on virtual router#1465
Closed
remibergsma wants to merge 1 commit intoapache:masterfrom
Closed
Fix concurrency issue on virtual router#1465remibergsma wants to merge 1 commit intoapache:masterfrom
remibergsma wants to merge 1 commit intoapache:masterfrom
Conversation
Backported from Cosmic.
|
|
||
| #remove the configuration file, log file should have all the records as well | ||
| rm -f $cfg | ||
| mv $cfg /var/cache/cloud/processed/ |
Contributor
There was a problem hiding this comment.
Do we know this will get cleaned?
Contributor
|
code LGTM running integration suite |
Contributor
Author
|
@DaanHoogland This can be pointed towards 4.7 so I will close this and open one to 4.7 instead of master. |
|
|
||
|
|
||
| private static String appendUuidToJsonFiles(final String filename) { | ||
| String remoteFileName = new String(filename); |
Contributor
There was a problem hiding this comment.
Why are is a new String(filename) being done? This avoids the constant pool, and is extremely expensive. Consider the following usage of StringBuilder to avoid unnecessary pressure on the String constant pool due to the new call and string concatenation:
final StringBuilder remoteFileName = new StringBuilder(filename);
if (filename.endWith("json")) {
remoteFileName.append(".");
remoteFileName.append(UUID.randomUUID()); // implicit call to toString
}
return remoteFileName.toString();
Contributor
|
it was already started :( |
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.
The json files now have UUIDs to prevent them from getting overwritten before they've been executed. Prevents config to be pushed to the wrong router :-s
On the router: