Skip to content

Commit

Permalink
Make Searchable Snapshot's CacheFile Lock less (elastic#63911)
Browse files Browse the repository at this point in the history
Replacing the mechanism for eviction and listener references via a read-write lock by
a reference counting implementation.
This fixes a bug that caused test failure elastic#63586 in which concurrently trying to acquire or release
an eviction listener while doing a file operation would sometimes lead to throwing an exception
since the `tryLock` call on the read lock would fail in this case.
Also this removes the possibility of blocking cluster state updates as a result of them waiting
on the write-lock which might take a long time if a slow read operation executes concurrently.

Closes elastic#63586
  • Loading branch information
original-brownbear committed Oct 26, 2020
1 parent bec3eca commit f39095a
Show file tree
Hide file tree
Showing 3 changed files with 416 additions and 362 deletions.
Loading

0 comments on commit f39095a

Please sign in to comment.