]
Dan Berindei closed ISPN-12031.
-------------------------------
Resolution: Explained
{{PersistenceManagerImpl.writeMapCommand()}} actually does ignore shared stores on backup
owners, but the decision is in {{PersistenceManagerImpl.createWriteFlowable().}}
PutMapCommand should only write to shared stores on the primary
owners
----------------------------------------------------------------------
Key: ISPN-12031
URL:
https://issues.redhat.com/browse/ISPN-12031
Project: Infinispan
Issue Type: Bug
Components: Core, Loaders and Stores
Affects Versions: 11.0.0.Final, 10.1.8.Final
Reporter: Dan Berindei
Priority: Major
Fix For: 12.0.0.Final
{{DistCacheWriterInterceptor}} uses {{skipSharedStores()}} for single-key write commands
and multi-key functional commands in order to write to shared stores only on the primary
owner of the key. For {{PutMapCommand}} it uses
{{PersistenceManagerImpl.writeMapCommand()}}, which does not distinguish between shared
and non-shared stores.
In addition to being inefficient, this makes it possible for a backup owner to update the
value in the shared store after the primary owner released the lock, potentially out of
order with another write operation (especially if the other write operation is single-key,
so it only writes to the shared store from the primary).