You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "yurinaryshkin (via GitHub)" <gi...@apache.org> on 2023/10/25 09:01:48 UTC
[PR] Ignite 20722 [ignite]
yurinaryshkin opened a new pull request, #11014:
URL: https://github.com/apache/ignite/pull/11014
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
- [ ] There is a single JIRA ticket related to the pull request.
- [ ] The web-link to the pull request is attached to the JIRA ticket.
- [ ] The JIRA ticket has the _Patch Available_ state.
- [ ] The pull request body describes changes that have been made.
The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
- [ ] The pull request title is treated as the final commit message.
The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
- [ ] A reviewer has been mentioned through the JIRA comments
(see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers))
- [ ] The pull request has been checked by the Teamcity Bot and
the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html))
### Notes
- [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
- [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
- [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
- [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-20722 Support skipCopies for DumpReader [ignite]
Posted by "yurinaryshkin (via GitHub)" <gi...@apache.org>.
yurinaryshkin commented on code in PR #11014:
URL: https://github.com/apache/ignite/pull/11014#discussion_r1376128020
##########
modules/core/src/main/java/org/apache/ignite/dump/DumpReader.java:
##########
@@ -108,11 +109,22 @@ public DumpReader(DumpReaderConfiguration cfg, IgniteLogger log) {
AtomicBoolean skip = new AtomicBoolean(false);
+ Map<Integer, Set<Integer>> groups = cfg.skipCopies() ? new HashMap<>() : null;
+
for (Map.Entry<Integer, List<String>> e : grpToNodes.entrySet()) {
int grp = e.getKey();
for (String node : e.getValue()) {
for (int part : dump.partitions(node, grp)) {
+ if (groups != null && !groups.computeIfAbsent(grp, key -> new HashSet<>()).add(part)) {
+ if (log.isDebugEnabled()) {
Review Comment:
Changed
##########
modules/core/src/main/java/org/apache/ignite/dump/DumpReaderConfiguration.java:
##########
@@ -58,12 +58,15 @@ public class DumpReaderConfiguration {
/** Cache group names. */
private String[] cacheGroupNames;
+ /** Skip copies. */
+ private boolean skipCopies;
Review Comment:
Yes. Updated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-20722 Support skipCopies for DumpReader [ignite]
Posted by "yurinaryshkin (via GitHub)" <gi...@apache.org>.
yurinaryshkin commented on code in PR #11014:
URL: https://github.com/apache/ignite/pull/11014#discussion_r1376127311
##########
modules/core/src/main/java/org/apache/ignite/dump/DumpReader.java:
##########
@@ -89,13 +90,13 @@ public DumpReader(DumpReaderConfiguration cfg, IgniteLogger log) {
Map<Integer, List<String>> grpToNodes = new HashMap<>();
- Set<Integer> cacheGroupIds = cfg.cacheGroupNames() != null
+ Set<Integer> cacheGrpIds = cfg.cacheGroupNames() != null
Review Comment:
Reverted
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-20722 Support skipCopies for DumpReader [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #11014:
URL: https://github.com/apache/ignite/pull/11014#discussion_r1375926403
##########
modules/core/src/main/java/org/apache/ignite/dump/DumpReader.java:
##########
@@ -108,11 +109,22 @@ public DumpReader(DumpReaderConfiguration cfg, IgniteLogger log) {
AtomicBoolean skip = new AtomicBoolean(false);
+ Map<Integer, Set<Integer>> groups = cfg.skipCopies() ? new HashMap<>() : null;
+
for (Map.Entry<Integer, List<String>> e : grpToNodes.entrySet()) {
int grp = e.getKey();
Review Comment:
YOu can init group set here and omit check on each part:
```
groups.computeIfAbsent(grp, key -> new HashSet<>())
```
```
if (groups != null && !groups.get(grp).add(part)) {
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-20722 Support skipCopies for DumpReader [ignite]
Posted by "yurinaryshkin (via GitHub)" <gi...@apache.org>.
yurinaryshkin commented on code in PR #11014:
URL: https://github.com/apache/ignite/pull/11014#discussion_r1376130252
##########
modules/core/src/main/java/org/apache/ignite/dump/DumpReader.java:
##########
@@ -108,11 +109,22 @@ public DumpReader(DumpReaderConfiguration cfg, IgniteLogger log) {
AtomicBoolean skip = new AtomicBoolean(false);
+ Map<Integer, Set<Integer>> groups = cfg.skipCopies() ? new HashMap<>() : null;
+
for (Map.Entry<Integer, List<String>> e : grpToNodes.entrySet()) {
int grp = e.getKey();
Review Comment:
Changed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-20722 Support skipCopies for DumpReader [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #11014:
URL: https://github.com/apache/ignite/pull/11014#discussion_r1375921048
##########
modules/core/src/main/java/org/apache/ignite/dump/DumpReader.java:
##########
@@ -108,11 +109,22 @@ public DumpReader(DumpReaderConfiguration cfg, IgniteLogger log) {
AtomicBoolean skip = new AtomicBoolean(false);
+ Map<Integer, Set<Integer>> groups = cfg.skipCopies() ? new HashMap<>() : null;
+
for (Map.Entry<Integer, List<String>> e : grpToNodes.entrySet()) {
int grp = e.getKey();
for (String node : e.getValue()) {
for (int part : dump.partitions(node, grp)) {
+ if (groups != null && !groups.computeIfAbsent(grp, key -> new HashSet<>()).add(part)) {
+ if (log.isDebugEnabled()) {
Review Comment:
Let's log on info level.
##########
modules/core/src/main/java/org/apache/ignite/dump/DumpReaderConfiguration.java:
##########
@@ -58,12 +58,15 @@ public class DumpReaderConfiguration {
/** Cache group names. */
private String[] cacheGroupNames;
+ /** Skip copies. */
+ private boolean skipCopies;
Review Comment:
can be final?
##########
modules/core/src/main/java/org/apache/ignite/dump/DumpReader.java:
##########
@@ -89,13 +90,13 @@ public DumpReader(DumpReaderConfiguration cfg, IgniteLogger log) {
Map<Integer, List<String>> grpToNodes = new HashMap<>();
- Set<Integer> cacheGroupIds = cfg.cacheGroupNames() != null
+ Set<Integer> cacheGrpIds = cfg.cacheGroupNames() != null
Review Comment:
Seems these changes not related to the ticket. Please, revert.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-20722 Support skipCopies for DumpReader [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov merged PR #11014:
URL: https://github.com/apache/ignite/pull/11014
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org