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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to