-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Query cache is not cleaned up in case of an index creation failure #48186
Copy link
Copy link
Closed
Labels
:Distributed/CRUDA catch all label for issues around indexing, updating and getting a doc by id. Not search.A catch all label for issues around indexing, updating and getting a doc by id. Not search.>bug
Description
Creating an index with index.mapper.dynamic setting will fail in 7.x with something like
java.lang.IllegalArgumentException: Setting index.mapper.dynamic was removed after version 6.0.0
at org.elasticsearch.index.mapper.MapperService.<init>(MapperService.java:165) ~[elasticsearch-7.4.0.jar:7.4.0]
at org.elasticsearch.index.IndexService.<init>(IndexService.java:180) ~[elasticsearch-7.4.0.jar:7.4.0]
at org.elasticsearch.index.IndexModule.newIndexService(IndexModule.java:411) ~[elasticsearch-7.4.0.jar:7.4.0]
at org.elasticsearch.indices.IndicesService.createIndexService(IndicesService.java:550) ~[elasticsearch-7.4.0.jar:7.4.0]
at org.elasticsearch.indices.IndicesService.createIndex(IndicesService.java:499) ~[elasticsearch-7.4.0.jar:7.4.0]
But this seems to introduce a leak by creating the query cache before the index is created, and not cleaning the cache in case of failure. This manifests itself as OptOutQueryCache instances kept alive in heap, each of them referencing the non-existent, attempted-to-be-created-and-failed indexName.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
:Distributed/CRUDA catch all label for issues around indexing, updating and getting a doc by id. Not search.A catch all label for issues around indexing, updating and getting a doc by id. Not search.>bug
Type
Fields
Give feedbackNo fields configured for issues without a type.