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

Binhua Hu updated CALCITE-6725:
-------------------------------
    Description: 
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.

  was:The connect methodĀ  inĀ  ElasticsearchSchemaFactory did not set a rest 
client timeout when creating a rest client

        Summary: The caching mechanism key in ElasticsearchSchemaFactory is 
affected by the order of hosts  (was:  ElasticsearchSchemaFactory has no client 
timeout period)

> 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
>
> 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