You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To reproduce, start a single node and as soon as node starts run the following script:
# Create and delete index a few times
for i in {1..4}
do
curl -XDELETE localhost:9200/test
curl -XPUT localhost:9200/test -d '{
"settings": {
"index.number_of_shards": 1,
"index.number_of_replicas": 0
}
}'
curl -XPUT localhost:9200/test/doc/1 -d '{"foo": "bar"}'
curl -XPUT localhost:9200/test/doc/2 -d '{"foo": "bar"}'
curl -XPUT localhost:9200/test/doc/3 -d '{"foo": "bar"}'
curl -XPOST localhost:9200/test/_refresh
# Do search to fill filter cache
curl "localhost:9200/test/doc/_search"
done
# Sleep for indices.cache.filter.clean_interval
# Reduce it to make this repro run faster
echo
echo "Waiting 1 min for cache to be cleaned"
sleep 60
curl -s -XGET 'http://localhost:9200/_nodes/stats?pretty=true'
IndicesFilterCache is using index name to dispatch removal notifications.
When index closes, it doesn't clean the cache immediately. So, it's possible that the cache for the old index will be cleaned when a new index with the same name is already created.
As a result, it's possible for WeightedFilterCache to receive notifications targeted for the previous incarnations of the index with the same name.
WeightedFilterCache decrements stats counters without checking if removal notification was sent for this index or for one of its previous incarnations.
The text was updated successfully, but these errors were encountered:
To reproduce, start a single node and as soon as node starts run the following script:
The result of this script is
Analysis:
The text was updated successfully, but these errors were encountered: