EHC ❯ Possible deadlock in WriteBehind
-
Bug
-
Status: Resolved
-
2 Major
-
Resolution: Fixed
-
ehcache
-
-
ljacomet
-
Reporter: ljacomet
-
September 15, 2015
-
0
-
Watchers: 1
-
October 13, 2015
-
September 15, 2015
Description
If “last” writer on a write behind enabled cache sees the write queue as full it will wait forever on the condition. This is caused by the fact that the processing thread only notifies the queue to be drained after waiting for new items to make it into the queue.
In a live system, as writes happen regularly, occurrence of the problem is much less likely.
Change is to signal first that the queue has been drained before waiting for it to fill again in the processing thread.
This issue was discovered during Ehcache 3 development - see https://github.com/ehcache/ehcache3/issues/576