-
Bug
-
Resolution: Done
-
Major
-
9.4.17.Final, 10.1.0.Final
-
None
-
DataGrid Sprint #38, DataGrid Sprint #39
ISPN-10337 ensured that the JdbcStringBasedStore correctly acquired the locks of expired rows during the purging of store entries, however it has exposed an issue with shared stores. When the jdbc store is shared, the coordinator locks the rows of the affected entries and releases them once they have all been removed as part of the purge transaction. However, the call to ExpirationManager::handleInStoreExpiration also sends a RemoveExpiredCommand to ensure that entries are removed from memory. This results in a java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction being thrown by the store's delete method when the purge process is still in progress, because the expired rows are still locked and the purge process cannot complete until the RemoveExpiredCommand has been executed.
In summary:
- purge locks all the rows
- purge sends a RemoveExpiredCommand and waits for it to complete
- RemoveExpiredCommand tries to remove the row but it can't as it is locked
Solution, send the RemoveExpiredCommand with the SKIP_CACHE_STORE flag when a store is shared,so that it only removes entries from memory.
- is caused by
-
ISPN-10337 JDBC Purge consistency issues
- Closed