-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
IGNITE-20861 P2P prevent to load already deployed class from different node on SHARED mode #11041
Conversation
a64b1ed
to
62610ed
Compare
3859496
to
e14cc7b
Compare
|
||
synchronized (mux) { | ||
// Check obsolete request. | ||
if (isDeadClassLoader(meta)) | ||
return null; | ||
|
||
Collection<GridDeployment> created = getDeployments(); |
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.
It should be in the If closure bellow.
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.
done thanks
if (meta.deploymentMode() == SHARED) { | ||
for (GridDeployment dep0 : created) { | ||
// hot redeploy from same node | ||
if (dep0.participants().containsKey(meta.senderNodeId()) || dep0.undeployed()) |
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 are we skipping participan deployment?
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.
because the case of this part is to find participant by nodeId and register if such is not found
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.
check code a bit below, if participant contains - skip, if not - register
IgniteBiTuple<Class<?>, Throwable> cls = dep0.deployedClass(meta.className(), meta.alias()); | ||
|
||
if (cls.getKey() != null && cls.getValue() == null) { | ||
addParticipant((SharedDeployment)dep0, meta); |
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.
Here you move all partisipants for a class meta to the deploymnt, but bellow we might update the partisipant list in the class meta.
May we try to update the partisipant list at first or don't do the update because the new list won't use?
if (!skipSearchDeployment) | ||
dep = (SharedDeployment)searchDeploymentCache(meta); | ||
else | ||
dep = null; |
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.
We can assignt the variable as null at definition.
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.
done thanks
if (cls.getKey() != null && cls.getValue() == null) { | ||
addParticipant((SharedDeployment)dep0, meta); | ||
skipSearchDeployment = true; | ||
} |
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 don't bracke the loop when you find the deployment?
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.
Also, I think we can assigned it into dep variable and brake the root while loop.
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.
because in common - getDeployments() returns the collection an we need to update all participants
…t node on SHARED mode
…t node on SHARED mode
Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
The Contribution Checklist
The description explains WHAT and WHY was made instead of HOW.
The following pattern must be used:
IGNITE-XXXX Change summary
whereXXXX
- number of JIRA issue.(see the Maintainers list)
the
green visa
attached to the JIRA ticket (see TC.Bot: Check PR)Notes
If you need any help, please email [email protected] or ask anу advice on http://asf.slack.com #ignite channel.