-
Notifications
You must be signed in to change notification settings - Fork 1.9k
IGNITE-27699 Make "metastorage" and "distributedMetastorage" system v… #12674
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
| * Generated by {@code org.apache.ignite.codegen.SystemViewRowAttributeWalkerGenerator}. | ||
| * {@link SqlQueryHistoryView} attributes walker. | ||
| * | ||
| * |
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.
Do we really need this change?
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.
It's a generated code, this view was somehow changed after generation and now every time SystemViewRowAttributeWalkerGenerator is called this change is reappears again.
| 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() |
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.
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
- Do we have keys where one key is prefix of another key?
- Will such behavior be clear for user?
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.
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.
- I don't know, but I think it's possible.
- 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.
…iews filtrable (review comments)
|
chesnokoff
left a comment
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.
LGTM!



…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
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 [email protected] or ask anу advice on http://asf.slack.com #ignite channel.