elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.89k stars 24.72k forks source link

Remove uses of ImmutableOpen*Map #86239

Open rjernst opened 2 years ago

rjernst commented 2 years ago

After https://github.com/elastic/elasticsearch/issues/84735, hppc usage in Elasticsearch is now isolated to ImmutableOpenMap and ImmutableOpenIntMap. This is a meta issue delineating the remaining uses of those classes that need to be removed.

elasticmachine commented 2 years ago

Pinging @elastic/es-core-infra (Team:Core/Infra)

dakrone commented 2 years ago

@rjernst do we still plan to keep some (most?) of these as immutable maps, or are we converting to mutable HashMap-like maps for these?

rjernst commented 2 years ago

Yes I think they can and should remain immutable, just immutable Map instances with Map.of or Map.copyOf.

thecoop commented 2 years ago

ImmutableOpenMap was added to the cluster/index metadata classes in #86673 for performance reasons. So we need to find a different collection type (maybe guava immutablemap?) if we want to remove ImmutableOpenMap

thecoop commented 2 years ago

https://github.com/elastic/elasticsearch/pull/90006 caused a performance drop, needs to be thought about more