[
https://issues.jboss.org/browse/ISPN-3795?page=com.atlassian.jira.plugin....
]
Sanne Grinovero commented on ISPN-3795:
---------------------------------------
{quote}+1 IGNORE_RETURN_VALUE should not be honoured if prevents the indexing to
work.{quote}
I agree on the high level but there are some alternatives we could consider.
As far as I remember we need the previous value just because we need to know which object
type is being replaced. Since we allow each "type" to be mapped to its own
index, this is necessary to know which index needs to be purged of the previous value.
We have loads of (other) problems all caused by this commonality of allowing different
types to be stored in the same cache; if we could implement the restriction of strongly
type-safe Caches we would resolve the other problems and also no longer need this one.
Incidentally polymorphic hierarchies in Hibernate Search get indexed in the same index, so
the problem is really only triggered by the user doing something like storing _unrelated_
types: we would be fine with parent/child relations. While Hibernate Search indexed
parent/child objects in the index _by default_ we would also benefit from enforcing this
in Infinispan.
Having strong type-safety would allow us to remove a lot more overhead as many checks
currently need to be performed on a per-operation base, and the current state also
requires much metadata to be computed dynamically.
QueryInterceptor incorrectly relies on the return value of a
RemoveCommand
--------------------------------------------------------------------------
Key: ISPN-3795
URL:
https://issues.jboss.org/browse/ISPN-3795
Project: Infinispan
Issue Type: Bug
Components: Embedded Querying
Affects Versions: 6.0.0.Final
Reporter: Dan Berindei
Assignee: Gustavo Fernandes
QueryInterceptor uses the return value from RemoveCommand/ReplaceCommand to remove the
value from the index.
But both RemoveCommand and ReplaceCommand have a variant with an expected value
parameter, and this variant return a boolean value instead of the removed/replaced value.
In that case, the previous value won't be removed from the index.
QueryInterceptor should probably use the previous value from the context entries to
update the index instead.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)