Artem Shutak created IGNITE-2973:
------------------------------------
Summary: CacheInterceptor gets mixed user and binary objects in
case of 'withKeepBinary' cache and EntryProcessor which sets user object as a
value
Key: IGNITE-2973
URL: https://issues.apache.org/jira/browse/IGNITE-2973
Project: Ignite
Issue Type: Bug
Affects Versions: 1.5.0.final
Reporter: Artem Shutak
Methods of {{CacheInterceptor}} gets mixed user and binary objects as params in
case of {{withKeepBinary}} cache and if {{EntryProcessor}} sets user object as
a value.
{{Cache.withKeepBinary().invoke(..)}} and {{EntryProcessor}} which sets user
object as value (not {{BinaryObject}}). Then method
{{Interceptor.onBeforePut(Entry e, Object newVal)}} gets {{e.getKey()}} and
{{e.getValue()}} as {{BinaryObject}}, {{newVal}} as userObject (for ATOMIC
cache) or {{BinaryObject}} (for TRANSACTIONAL cache), but
{{Interceptor.onAfterPut(Entry e)}} gets {{e.getKey()}} as {{BinaryObject}} and
{{e.getValue}} as user object sometimes, but should be {{BinaryObject}}. The
issue can be reproduced only with Atomic cache.
I think it a little bit tricky to use such inconsistent API and not obvious for
user where they can get {{BinaryObject}} and where user object.
The same issue can be reproduces for {{invokeAll()}}.
Tests on these cases can be found at {{InterceptorWithKeepBinaryCacheTest}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)