Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-6725

The caching mechanism key in ElasticsearchSchemaFactory is affected by the order of hosts

    XMLWordPrintableJSON

Details

    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.

      Attachments

        Activity

          People

            amazingBoy_hbh Binhua Hu
            amazingBoy_hbh Binhua Hu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: