-
Notifications
You must be signed in to change notification settings - Fork 2
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
upgrade to rlp_03 version 8 #9
base: main
Are you sure you want to change the base?
Conversation
…threaded executor that servers connection -> launches more connections within the same eventloop while handling event does not work because: the one launching more blocks the subsequent ones, perhaps future.whenComplete() ?
…ssageParser); too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added bunch of comments and change requests
@@ -267,6 +267,8 @@ | |||
<version>3.12.1</version> | |||
<configuration> | |||
<compilerArgument>-Xlint:all</compilerArgument> | |||
<source>9</source> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version 9? We can enforce java8 with enforcer rules from project-archetype
@@ -257,8 +257,8 @@ | |||
<artifactId>maven-surefire-plugin</artifactId> | |||
<version>3.2.5</version> | |||
<configuration> | |||
<parallel>all</parallel> | |||
<useUnlimitedThreads>true</useUnlimitedThreads> | |||
<parallel>none</parallel> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a comment why parallelism is disabled
.orTimeout(connectionTimeout, TimeUnit.MILLISECONDS); | ||
|
||
futureClient.thenAccept(client -> { | ||
String offer = ("\nrelp_version=0\nrelp_software=cfe_35\ncommands=" + "syslog" + "\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to have this as variable in code instead of defined field variable or something? Also why string concatenation as no variables are present
} | ||
LOGGER.debug("returning outputReplyFutures.size() <{}>", outputReplyFutures.size()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug guard this so .size()
won't be repeatedly called
client.close(); | ||
} | ||
catch (Exception e) { | ||
throw new RuntimeException(e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this failure kill the whole process? If not, what happens to the client and other threads?
RoutingConfig routingConfig = new RoutingConfig(); | ||
try (TargetRouting targetRouting = new ParallelTargetRouting(routingConfig, this.metricRegistry)) { | ||
try ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer no try even if it is try-with-resources in tests
|
||
CompletableFuture.allOf(completableFutures).get(); | ||
} | ||
catch (ExecutionException | InterruptedException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try/catch in tests, refactor to a better version without them
|
||
CompletableFuture.allOf(completableFutures).get(); | ||
} | ||
catch (ExecutionException | InterruptedException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try/catch in tests, refactor to a version without them
|
||
CompletableFuture.allOf(completableFutures).get(); | ||
} | ||
catch (ExecutionException | InterruptedException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try/catch in tests, refactor to a version without them
|
||
CompletableFuture.allOf(completableFutures).get(); | ||
} | ||
catch (ExecutionException | InterruptedException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try/catch in tests, refactor to a version without them
Additional note: I haven't yet tested the compilation or even running the software and the notes above are just from the initial readthrough of the PR, will add more if necessary |
No description provided.