You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladislav Pyatkov (Jira)" <ji...@apache.org> on 2021/12/09 11:32:00 UTC
[jira] [Comment Edited] (IGNITE-15718) Issues in implementation of the method TableManager#table(String)
[ https://issues.apache.org/jira/browse/IGNITE-15718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17456354#comment-17456354 ]
Vladislav Pyatkov edited comment on IGNITE-15718 at 12/9/21, 11:31 AM:
-----------------------------------------------------------------------
Hi [~maliev]
We want to avoid returning a stale table to the client side, but it is still possible:
{code}
Table tbl = tables.get(name);
if (tbl != null) {
return CompletableFuture.completedFuture(tbl);
}
{code}
Required to get actual ID from Metastorage before getting a table.
Also, I sure you can to write a test, where Metastorage majority create, drop and create again table with the similar name, but one Ignite node lagging and has received yet this updates.
Use {{WatchListenerInhibitor}} to simulate a slow node.
was (Author: v.pyatkov):
Hi [~maliev]
We want to avoid returning a stale table to the client side, but it is still possible:
{code}
Table tbl = tables.get(name);
if (tbl != null) {
return CompletableFuture.completedFuture(tbl);
}
{code}
Required to get actual ID from Metastorage before getting a table.
Also, I sure you can to write a test, where Metastorage majority create, drop and create again table with the similar name, but one Ignite node lagging and has received yet this updates.
Use `WatchListenerInhibitor` to simulate a slow node.
> Issues in implementation of the method TableManager#table(String)
> -----------------------------------------------------------------
>
> Key: IGNITE-15718
> URL: https://issues.apache.org/jira/browse/IGNITE-15718
> Project: Ignite
> Issue Type: Bug
> Reporter: Vladislav Pyatkov
> Assignee: Mirza Aliev
> Priority: Major
> Labels: ignite-3
> Fix For: 3.0.0-alpha4
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The method (TableManager#table(String)), where we are waiting for a table creation by name, is not correct, because we can see an event about another table with the same name (it is possible when a node is lagging behind of other and is seeing outdated events about drop/create the table, but the name unique only in one time). Need to wait for table creation by ID, because ID is unique for each table even on infinity time.
> Also, after the ticket (IGNITE-15412) where Configuration API was extended of possibility to read a Metasorage value directly, has been fixed, it is time to fix method _TableManager#isTableConfigured(String)_.
> UPD:
> Direct value for _TableManager#isTableConfigured(String)_ has been done in IGNITE-15881
--
This message was sent by Atlassian Jira
(v8.20.1#820001)