-
Notifications
You must be signed in to change notification settings - Fork 1.9k
IGNITE-27759 Remove redundant serialization of SnapshotHandlerResult#node #12702
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
Conversation
|
|
||
| if (res.error() != null) { | ||
| bldr.addException(res.node(), res.error()); | ||
| bldr.addException(cctx.discovery().node(nodeId), res.error()); |
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.
What if node is already gone?
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.
This case is nearly impossible (the distributed process should cover it). But even if a node goes down after receiving the results, I now use historicalNode. Thanks!
| private IgniteInternalFuture<Void> completeHandlersAsyncIfNeeded( | ||
| SnapshotOperation snpOp, | ||
| Collection<SnapshotOperationResponse> res | ||
| Map<UUID, SnapshotOperationResponse> res |
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.
Fixed
| for (SnapshotOperationResponse snpRes : res) { | ||
| if (snpRes == null || snpRes.handlerResults() == null) | ||
| continue; | ||
| res.forEach((nodeId, r) -> { |
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.
Suggestion: (nodeId, r) -> (nodeId, snpRes)
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
| continue; | ||
| res.forEach((nodeId, r) -> { | ||
| if (r == null || r.handlerResults() == null) | ||
| return; |
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.
Previously, iteration was performed via a loop; now it is done using a lambda
| private IgniteInternalFuture<Void> completeHandlersAsyncIfNeeded( | ||
| SnapshotOperation snpOp, | ||
| Collection<SnapshotOperationResponse> res | ||
| Map<UUID, SnapshotOperationResponse> res |
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.
Fixed
| continue; | ||
| res.forEach((nodeId, r) -> { | ||
| if (r == null || r.handlerResults() == null) | ||
| return; |
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.
Previously, iteration was performed via a loop; now it is done using a lambda
|



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 summarywhereXXXX- number of JIRA issue.(see the Maintainers list)
the
green visaattached to the JIRA ticket (see TC.Bot: Check PR)Notes
If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com #ignite channel.