You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "alex-plekhanov (via GitHub)" <gi...@apache.org> on 2026/01/29 10:59:01 UTC
[PR] IGNITE-27699 Make "metastorage" and "distributedMetastorage" system v… [ignite]
alex-plekhanov opened a new pull request, #12674:
URL: https://github.com/apache/ignite/pull/12674
…iews filtrable
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-27699 Make "metastorage" and "distributedMetastorage" system v… [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12674:
URL: https://github.com/apache/ignite/pull/12674#issuecomment-3817029119
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12674) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12674&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12674&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12674&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12674&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12674&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12674)
--
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-27699 Make "metastorage" and "distributedMetastorage" system v… [ignite]
Posted by "asf-gitbox-commits (via GitHub)" <gi...@apache.org>.
asf-gitbox-commits closed pull request #12674: IGNITE-27699 Make "metastorage" and "distributedMetastorage" system v…
URL: https://github.com/apache/ignite/pull/12674
--
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-27699 Make "metastorage" and "distributedMetastorage" system v… [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12674:
URL: https://github.com/apache/ignite/pull/12674#issuecomment-3822153175
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12674) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12674&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12674&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12674&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12674&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12674&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12674)
--
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-27699 Make "metastorage" and "distributedMetastorage" system v… [ignite]
Posted by "chesnokoff (via GitHub)" <gi...@apache.org>.
chesnokoff commented on code in PR #12674:
URL: https://github.com/apache/ignite/pull/12674#discussion_r2744879118
##########
modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/SqlQueryHistoryViewWalker.java:
##########
@@ -24,7 +24,7 @@
/**
* Generated by {@code org.apache.ignite.codegen.SystemViewRowAttributeWalkerGenerator}.
* {@link SqlQueryHistoryView} attributes walker.
- *
+ *
Review Comment:
Nice catch then
##########
modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/SqlQueryHistoryViewWalker.java:
##########
@@ -24,7 +24,7 @@
/**
* Generated by {@code org.apache.ignite.codegen.SystemViewRowAttributeWalkerGenerator}.
* {@link SqlQueryHistoryView} attributes walker.
- *
+ *
Review Comment:
Nice catch then!
--
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-27699 Make "metastorage" and "distributedMetastorage" system v… [ignite]
Posted by "chesnokoff (via GitHub)" <gi...@apache.org>.
chesnokoff commented on code in PR #12674:
URL: https://github.com/apache/ignite/pull/12674#discussion_r2744879118
##########
modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/SqlQueryHistoryViewWalker.java:
##########
@@ -24,7 +24,7 @@
/**
* Generated by {@code org.apache.ignite.codegen.SystemViewRowAttributeWalkerGenerator}.
* {@link SqlQueryHistoryView} attributes walker.
- *
+ *
Review Comment:
Nice catch then!
--
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-27699 Make "metastorage" and "distributedMetastorage" system v… [ignite]
Posted by "alex-plekhanov (via GitHub)" <gi...@apache.org>.
alex-plekhanov commented on code in PR #12674:
URL: https://github.com/apache/ignite/pull/12674#discussion_r2744868303
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/metastorage/persistence/DistributedMetaStorageImpl.java:
##########
@@ -324,12 +324,17 @@ public void inMemoryReadyForRead() {
/** */
private void registerSystemView() {
- ctx.systemView().registerView(DISTRIBUTED_METASTORE_VIEW, DISTRIBUTED_METASTORE_VIEW_DESC,
- new MetastorageViewWalker(), () -> {
+ ctx.systemView().registerFiltrableView(DISTRIBUTED_METASTORE_VIEW, DISTRIBUTED_METASTORE_VIEW_DESC,
+ new MetastorageViewWalker(), filter -> {
+ String name = (String)filter.get(MetastorageViewWalker.NAME_FILTER);
+
+ if (name == null)
+ name = "";
+
try {
List<MetastorageView> data = new ArrayList<>();
- iterate("", (key, val) -> data.add(new MetastorageView(key, val == null || !val.getClass().isArray()
+ iterate(name, (key, val) -> data.add(new MetastorageView(key, val == null || !val.getClass().isArray()
Review Comment:
We never state that `filter` is for exact match. So, formally, we are not violating the contract. It can be exect value, for some views, it can be prefix for another. In SQL, where contract required that filtering return exact value - there is post filtration based on condition after lookup by filter. So filtering it's a good way to narrow the scope.
1. I don't know, but I think it's possible.
2. I'm not sure anyone is using iterators direcly, views filtration are made usually using SQL, in SQL this is not an issue. But ok, I think we can fix it and make behaviour the same for different views.
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
Re: [PR] IGNITE-27699 Make "metastorage" and "distributedMetastorage" system v… [ignite]
Posted by "chesnokoff (via GitHub)" <gi...@apache.org>.
chesnokoff commented on code in PR #12674:
URL: https://github.com/apache/ignite/pull/12674#discussion_r2744773032
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/metastorage/persistence/DistributedMetaStorageImpl.java:
##########
@@ -324,12 +324,17 @@ public void inMemoryReadyForRead() {
/** */
private void registerSystemView() {
- ctx.systemView().registerView(DISTRIBUTED_METASTORE_VIEW, DISTRIBUTED_METASTORE_VIEW_DESC,
- new MetastorageViewWalker(), () -> {
+ ctx.systemView().registerFiltrableView(DISTRIBUTED_METASTORE_VIEW, DISTRIBUTED_METASTORE_VIEW_DESC,
+ new MetastorageViewWalker(), filter -> {
+ String name = (String)filter.get(MetastorageViewWalker.NAME_FILTER);
+
+ if (name == null)
+ name = "";
+
try {
List<MetastorageView> data = new ArrayList<>();
- iterate("", (key, val) -> data.add(new MetastorageView(key, val == null || !val.getClass().isArray()
+ iterate(name, (key, val) -> data.add(new MetastorageView(key, val == null || !val.getClass().isArray()
Review Comment:
`iterate` finds all keys with the given prefix. So if we pass something like `rolling.upgrade`, it will also return `rolling.upgrade.version`.
This could be confusing, especially since in `org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor#nodeAttributeViewSupplier` we look up an attribute only by the exact `attrName`
1) Do we have keys where one key is prefix of another key?
2) Will such behavior be clear for user?
##########
modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/SqlQueryHistoryViewWalker.java:
##########
@@ -24,7 +24,7 @@
/**
* Generated by {@code org.apache.ignite.codegen.SystemViewRowAttributeWalkerGenerator}.
* {@link SqlQueryHistoryView} attributes walker.
- *
+ *
Review Comment:
Do we really need this change?
--
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-27699 Make "metastorage" and "distributedMetastorage" system v… [ignite]
Posted by "alex-plekhanov (via GitHub)" <gi...@apache.org>.
alex-plekhanov commented on code in PR #12674:
URL: https://github.com/apache/ignite/pull/12674#discussion_r2744807012
##########
modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/SqlQueryHistoryViewWalker.java:
##########
@@ -24,7 +24,7 @@
/**
* Generated by {@code org.apache.ignite.codegen.SystemViewRowAttributeWalkerGenerator}.
* {@link SqlQueryHistoryView} attributes walker.
- *
+ *
Review Comment:
It's a generated code, this view was somehow changed after generation and now every time SystemViewRowAttributeWalkerGenerator is called this change is reappears again.
--
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