[infinispan-issues] [JBoss JIRA] (ISPN-4351) Clarify the behaviour of putForExternalRead in clustered caches
Dan Berindei (JIRA)
issues at jboss.org
Thu Jun 5 05:26:15 EDT 2014
Dan Berindei created ISPN-4351:
----------------------------------
Summary: Clarify the behaviour of putForExternalRead in clustered caches
Key: ISPN-4351
URL: https://issues.jboss.org/browse/ISPN-4351
Project: Infinispan
Issue Type: Task
Components: Core, Documentation-Core
Affects Versions: 6.0.2.Final
Reporter: Dan Berindei
Assignee: Dan Berindei
Fix For: 7.0.0.Final
The {{putForExternal}} [documentation|http://infinispan.org/docs/7.0.x/user_guide/user_guide.html#_putforexternalread_operation] says
{quote}
putForExternalRead is consider to be a fast operation because regardless of whether it’s successful or not, it doesn’t wait for any locks, and so returns to the caller promptly.
{quote}
But the documentation doesn't say how {{putForExternalRead}} should behave in a clustered cache. Currently, the command is replicated to all the owners in distributed mode, and to all the cluster members in replicated mode. So the command may be delayed while waiting for the responses from those other nodes. The exception is invalidation mode, which doesn't replicate {{putForExternalRead}} commands - only regular {{put}}s generate invalidations.
The documentation also doesn't mention the interaction of {{putForExternalRead}} operations with transactions. Currently, {{PUT_FOR_EXTERNAL_READ}}-flagged commands are executed as non-transactional commands even when the cache is transactional, presumably to avoid the overhead of transactions. But this undermines the argument for wrapping regular write operations in an implicit transaction, when running in a transactional cache.
I propose changing {{putForExternalRead}} to only write on the local node (as it already does in invalidation mode), and documenting it as such. In distribution mode, it should be a no-op when the local node is not an owner.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
More information about the infinispan-issues
mailing list