You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "nizhikov (via GitHub)" <gi...@apache.org> on 2023/10/09 13:34:45 UTC
[PR] IGNITE-20597 Support cache group filter for dumps [ignite]
nizhikov opened a new pull request, #10986:
URL: https://github.com/apache/ignite/pull/10986
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-20597 Support cache group filter for dumps [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov merged PR #10986:
URL: https://github.com/apache/ignite/pull/10986
--
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-20597 Support cache group filter for dumps [ignite]
Posted by "timoninmaxim (via GitHub)" <gi...@apache.org>.
timoninmaxim commented on code in PR #10986:
URL: https://github.com/apache/ignite/pull/10986#discussion_r1354579981
##########
modules/core/src/main/java/org/apache/ignite/IgniteSnapshot.java:
##########
@@ -69,9 +70,10 @@ public interface IgniteSnapshot {
* In-memory cache groups also supported.
*
* @param name Dump name.
+ * @param cacheGroupNames Cache groups to include in snapshot or {@code null} to include all.
* @return Future which will be completed when dump ends.
*/
- public IgniteFuture<Void> createDump(String name);
+ public IgniteFuture<Void> createDump(String name, @Nullable Set<String> cacheGroupNames);
Review Comment:
Replace Set with Collection, as this style used in `restoreSnapshot` methods.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java:
##########
@@ -2299,6 +2302,7 @@ public IgniteFutureImpl<Void> createSnapshot(
}
List<String> grps = (dump ? cctx.cache().cacheGroupDescriptors().values() : cctx.cache().persistentGroups()).stream()
+ .filter(g -> cacheGroupNames == null || cacheGroupNames.contains(g.cacheOrGroupName()))
Review Comment:
What if `cacheGroupNames` param contains non-existent cache group. Should we stop snapshot process? Or at least write a warning.
--
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-20597 Support cache group filter for dumps [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #10986:
URL: https://github.com/apache/ignite/pull/10986#discussion_r1354701130
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java:
##########
@@ -2299,6 +2302,7 @@ public IgniteFutureImpl<Void> createSnapshot(
}
List<String> grps = (dump ? cctx.cache().cacheGroupDescriptors().values() : cctx.cache().persistentGroups()).stream()
+ .filter(g -> cacheGroupNames == null || cacheGroupNames.contains(g.cacheOrGroupName()))
Review Comment:
Warning added. Thanks.
##########
modules/core/src/main/java/org/apache/ignite/IgniteSnapshot.java:
##########
@@ -69,9 +70,10 @@ public interface IgniteSnapshot {
* In-memory cache groups also supported.
*
* @param name Dump name.
+ * @param cacheGroupNames Cache groups to include in snapshot or {@code null} to include all.
* @return Future which will be completed when dump ends.
*/
- public IgniteFuture<Void> createDump(String name);
+ public IgniteFuture<Void> createDump(String name, @Nullable Set<String> cacheGroupNames);
Review Comment:
Fixed.
--
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