OpenSearch/x-pack
Tanguy Leroux 289b1f4ae7
Reduce locking in prewarming (#61837) (#61967)
During prewarming of a Lucene file a CacheFile is acquired and 
then locked for the duration of the prewarming, ie locked until all 
the part of the file has been downloaded and written to cache on 
disk. The locking (executed with CacheFile#fileLock()) is here to 
prevent the cache file to be evicted while it is prewarming.

But holding the lock may take a while for large files, specially since
 restoring snapshot files now respects the 
indices.recovery.max_bytes_per_sec setting of 40mb (#58658), 
and this can have bad consequences like preventing the CacheFile 
to be evicted, opened or closed. In manual tests this bug slow 
downs various requests like mounting a new searchable snapshot
 index or deleting an existing one that is still prewarming.

This commit reduces the time the lock is held during prewarming so
 that the read lock is only required when actively writing to the CacheFile.
2020-09-04 15:06:50 +02:00
..
dev-tools
docs Kerberos doc kibana link (#61466) (#61619) 2020-08-27 12:42:52 +03:00
license-tools Replace immediate task creations by using task avoidance api (#60071) (#60504) 2020-07-31 13:09:04 +02:00
plugin Reduce locking in prewarming (#61837) (#61967) 2020-09-04 15:06:50 +02:00
qa Simplify adding plugins and modules to testclusters (#61886) 2020-09-03 19:37:46 -07:00
snapshot-tool Enforce fail on deprecated gradle usage (7.x backport) (#59758) 2020-07-20 08:52:30 +02:00
test Add SAML AuthN request signing tests (#61582) 2020-08-27 10:41:56 +03:00
transport-client Replace compile configuration usage with api (7.x backport) (#58721) 2020-06-30 15:57:41 +02:00
NOTICE.txt
README.md
build.gradle Replace immediate task creations by using task avoidance api (#60071) (#60504) 2020-07-31 13:09:04 +02:00

README.md

Elastic License Functionality

This directory tree contains files subject to the Elastic License. The files subject to the Elastic License are grouped in this directory to clearly separate them from files licensed under the Apache License 2.0.