[ 
https://issues.apache.org/jira/browse/CALCITE-6725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17906404#comment-17906404
 ] 

xiong duan commented on CALCITE-6725:
-------------------------------------

Fixed in 
[dbf4ff8|https://github.com/apache/calcite/commit/dbf4ff87ae34d7cb9e08037c15bd6fddfcaaef24].
 Thanks for the contribution [~amazingBoy_hbh]. Thanks for the review [~mbudiu] 
[~VAE] [~caicancai] .

> The caching mechanism key in ElasticsearchSchemaFactory is affected by the 
> order of hosts
> -----------------------------------------------------------------------------------------
>
>                 Key: CALCITE-6725
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6725
>             Project: Calcite
>          Issue Type: Bug
>          Components: elasticsearch-adapter
>            Reporter: Binhua Hu
>            Assignee: Binhua Hu
>            Priority: Major
>              Labels: pull-request-available
>
> In the original code, the cache key is built using Immutable List. of (hosts, 
> pathInitialize, username, password). If the elements in hosts are the same 
> but their positions change, since List is order sensitive in Java, it will be 
> treated as different cache keys, which will affect the uniqueness of the 
> cache.
> For example, if there are two hosts lists, one is ["host1", "host2"], and the 
> other is ["host2", "host1"], they will be treated as different keys, causing 
> the cache to fail to hit correctly.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to