OpenSearch/x-pack
Tanguy Leroux 8669766a81 Reduce contention in CacheFile.fileLock() method (#55662)
The CacheFile.fileLock() method is used to acquire a lock 
on a cache file so that the file can't be deleted (or its file 
handle closed) during the execution of a read or a write 
operation.

Today this lock is obtained by first acquiring the eviction 
lock (the write lock of the readwrite lock), then by checking 
if the cache file is evicted and the file channel still open, 
and finally by obtaining the file lock (the read lock of the 
readwrite lock). Acquiring the read lock while the eviction 
lock is held ensures that the cache file eviction cannot 
start in the meanwhile. But eviction starts (and terminations) 
also acquire the eviction lock; and this lock cannot be 
obtained while a read lock is held (the write lock of a 
readwrite lock is exclusive).

If we were acquiring a read lock and checking the eviction 
flag and file channel existence while holding the read lock 
we know that no eviction can start or finish until the 
read lock is released.
2020-04-23 14:40:27 +02:00
..
dev-tools
docs [7.x] Fix responses for the token APIs (#54532) (#55278) 2020-04-16 14:05:55 +03:00
license-tools Support "enterprise" license types (#49474) 2019-12-12 14:37:44 +11:00
plugin Reduce contention in CacheFile.fileLock() method (#55662) 2020-04-23 14:40:27 +02:00
qa [backport] Add geo_bounds aggregation support for geo_shape (#55328) (#55600) 2020-04-22 11:29:35 -07:00
snapshot-tool Remove guava from transitive compile classpath (#54309) (#54695) 2020-04-07 23:20:17 -07:00
test Upgrade feature aware check usage of ASM to 7.3.1 (#54577) 2020-04-18 10:49:57 -04:00
transport-client [7.x] Re-add origin url information to publish POM files (#55173) 2020-04-14 13:24:15 -07:00
NOTICE.txt
README.md
build.gradle [7.x] Update opensaml dependency (#44972) (#49512) 2019-11-29 00:17:16 +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.