[infinispan-issues] [JBoss JIRA] (ISPN-11110) JdbcStringBasedStore Purge should not use FOR UPDATE to avoid excessive locking
Tristan Tarrant (Jira)
issues at jboss.org
Mon Jun 15 03:56:15 EDT 2020
[ https://issues.redhat.com/browse/ISPN-11110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tristan Tarrant updated ISPN-11110:
-----------------------------------
Fix Version/s: 12.0.0.Final
(was: 11.0.0.Final)
> 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
> Priority: Major
> Fix For: 12.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)
More information about the infinispan-issues
mailing list