Skip to content
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

Merged
merged 7 commits into from Nov 25, 2015

Conversation

fviale
Copy link
Member

@fviale fviale commented Nov 23, 2015

No description provided.

…connection/disconnection

- replaced LinkedList with LinkedHashSet (avoids adding the same Node several time)
- added defensive checks.
- added more debug information
- initialize distance map
- set topology distance enabled in tests
- sonar reviews
@@ -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
Copy link
Contributor

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?

Copy link
Member Author

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.

@lpellegr
Copy link
Contributor

Is it not possible to write a test to reproduce the issue? if it is a concurrency issue, defensive checks will not be enough.

@fviale
Copy link
Member Author

fviale commented Nov 24, 2015

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) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule

@sonarqube-activeeon
Copy link

SonarQube analysis reported 5 issues:

  • MAJOR 5 major

Watch the comments in this conversation to review them.
Note: the following issues could not be reported as comments because they are located on lines that are not displayed in this pull request:

@@ -245,6 +264,38 @@ public Topology getTopology() {
}
}

private NodeSet getNodeSetWithExtraNodes(Set<Node> nodes, int number) {
Copy link
Contributor

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;
Copy link
Contributor

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.

Copy link
Contributor

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 :)

fviale added a commit that referenced this pull request Nov 25, 2015
TopologyManager's nodesOnHost map gets corrupted after several connection/disconnection #2384
@fviale fviale merged commit a38bef6 into ow2-proactive:master Nov 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants