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
TopologyManager's nodesOnHost map gets corrupted after several connection/disconnection #2384 #2386
Conversation
synchronize fork
…connection/disconnection - replaced LinkedList with LinkedHashSet (avoids adding the same Node several time) - added defensive checks.
@@ -19,4 +19,5 @@ pa.rm.select.node.dynamicity=10000 | |||
pa.rm.node.source.ping.frequency=10000 | |||
pa.rm.client.ping.frequency=10000 | |||
pa.rm.select.script.timeout=10000 | |||
pa.rm.topology.enabled=false |
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.
Why is it now required to enable topology in all configuration files even when it was not before? Is it because of the change in test LocalSelectionTest
?
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.
The LocalSelectionTest does need the topology to be enabled. The JobLegacySchema test in the scheduler needs both the topology and the topology-distance in order to pass.
Is it not possible to write a test to reproduce the issue? if it is a concurrency issue, defensive checks will not be enough. |
Right now I am not able to reproduce the issue, I added some debug information to try to understand it a bit more. Then I will be able to write a test eventually. |
} | ||
result.getExtraNodes().addAll(newExtraNodes); | ||
} | ||
if (--number <= 0) { |
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.
SonarQube analysis reported 5 issues: Watch the comments in this conversation to review them.
|
@@ -245,6 +264,38 @@ public Topology getTopology() { | |||
} | |||
} | |||
|
|||
private NodeSet getNodeSetWithExtraNodes(Set<Node> nodes, int number) { |
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.
Could you give better naming to the number variable?
public class TestTopologyConcurrency { | ||
|
||
// number of thread used in this test | ||
final int nb_threads = 20; |
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.
Java code convention is Camel case.
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.
"Test" should be always at the end of the name of the test class and at the beginning of the test methods :)
TopologyManager's nodesOnHost map gets corrupted after several connection/disconnection #2384
No description provided.