[ 
https://issues.apache.org/jira/browse/IGNITE-15721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ivan Bessonov updated IGNITE-15721:
-----------------------------------
    Affects Version/s: 3.0.0-alpha3

> Effective way of retrieving ​​tables by id.
> -------------------------------------------
>
>                 Key: IGNITE-15721
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15721
>             Project: Ignite
>          Issue Type: Improvement
>    Affects Versions: 3.0.0-alpha3
>            Reporter: Alexander Lapin
>            Assignee: Ivan Bessonov
>            Priority: Major
>              Labels: Configuration, iep-55, ignite-3
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> h3. Problem
> There are use cases that suppose retrieving configuration entities by id. For 
> example retrieving table by id. The only option now is to get all tables with 
> further iteration that will check whether a table id matches expected one. 
> Things get worse if it's required to get table by id from remote node, e.g.
> {code:java}
>     private boolean isTableConfigured(IgniteUuid id) {
>         NamedListView<TableView> directTablesCfg = 
> ((DirectConfigurationProperty<NamedListView<TableView>>)tablesCfg.tables()).directValue();
>         // TODO: IGNITE-15721 Need to review this approach after the ticket 
> would be fixed.
>         // Probably, it won't be required getting configuration of all tables 
> from Metastor.
>         for (String name : directTablesCfg.namedListKeys()) {
>             ExtendedTableView tView = 
> (ExtendedTableView)directTablesCfg.get(name);
>             if (tView != null && id.equals(IgniteUuid.fromString(tView.id())))
>                 return true;
>         }
>         return false;
>     }
> {code}
> It worth to mention that sometimes, for example in use case mentioned above, 
> exact data aren't needed, cause only fact of data absence is important. In 
> other words It'll be great not only to have ability to retrieve tables, 
> columns, indexes and other named list items by id (in addition to retrieving 
> by name) but also check whether required entity exists or not. Both local and 
> direct use cases are important.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to