[
https://issues.apache.org/jira/browse/IGNITE-19354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723108#comment-17723108
]
Igor Sapego commented on IGNITE-19354:
--------------------------------------
Looks good to me.
> Java thin 3.0: Same schema version is retrieved multiple times in concurrent
> scenarios
> --------------------------------------------------------------------------------------
>
> Key: IGNITE-19354
> URL: https://issues.apache.org/jira/browse/IGNITE-19354
> Project: Ignite
> Issue Type: Bug
> Components: thin client
> Reporter: Pavel Tupitsyn
> Assignee: Pavel Tupitsyn
> Priority: Major
> Labels: ignite-3
> Fix For: 3.0.0-beta2
>
>
> When *ClientTable.getSchema* is called, we send a request for the given
> schema version every time, even if another request for that version is active
> (e.g. in case of multiple concurrent TUPLE_GET requests).
> Instead of caching *ClientSchema*, we should cache
> *CompletableFuture<ClientSchema>*, and use *computeIfAbsent* to guarantee
> only one request for the given version. Make sure to handle failures - if a
> cached future is failed, send a new request.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)