Ryan Emerson created ISPN-11110:
-----------------------------------
Summary: JdbcStringBasedStore Purge should not use FOR UPDATE to avoid
excessive locking
Key: ISPN-11110
URL:
https://issues.redhat.com/browse/ISPN-11110
Project: Infinispan
Issue Type: Bug
Components: Loaders and Stores
Affects Versions: 10.1.0.CR1
Reporter: Ryan Emerson
Assignee: Ryan Emerson
Fix For: 11.0.0.Final
https://issues.redhat.com/browse/ISPN-10337 Added the FOR UPDATE to the select query used
by the purge method in order to ensure that the purge method would lock all of the
affected rows so that no subsequent updates to a key could be incorrectly removed by the
purge method.
However, if the purge does a select for update and does a single commit at the end of the
purge, that will block write operations on all the expired keys for the entire duration of
the purge. The clustered purge listener does cache.removeLifespanExpired(key, null,
null).join(), so the entire duration of the purge could mean a really long time.
Instead we should utilise a normal select query followed by a 'delete from table where
id = ? and timestamp = ?' to prevent accidentally deleting an update.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)