[
https://issues.apache.org/jira/browse/IGNITE-2953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Artem Shutak updated IGNITE-2953:
---------------------------------
Description:
When {{CacheEntryProcessor.process()}} method called on remote node, then
Ignite will serialize result of {{CacheEntryProcessor.process()}} to
{{BinaryObject}} and then the {{BinaryObject}} will be deserialized or not on
local node (which called invoke/invokeAll) depending on {{keepBinary}} flag of
current operation ({{cache.withKeepBinary()}} or not).
It's wrong behaviour for both withKeepBinary cache and not.
Lets look at the following use caseы with invoke/invokeAll and BinaryMarshaller:
# Cache.withKeepBinary
#- {{CacheEntryProcessor.process()}} returns any user object (not BinaryObject)
#- at this case user will get mixed user objects and {{BinaryObjects}}
depending on what node processing was done (local and remote)
# Cache without withKeepBinary
#- {{CacheEntryProcessor.process()}} returns {{BinaryObject}} builded like
{{ignite.binary().builder("MyObj").build()}}
#- at this case user will get exception because Ignite will try deseriallize
{{BinaryObject}}.
Looks like we need to add one more flag at {{GridCacheReturn}} message to
detect whether result should be converted from binary object or not (see
org/apache/ignite/internal/processors/cache/GridCacheReturn.java:334,
org/apache/ignite/internal/processors/cache/CacheInvokeDirectResult.java:91).
> Wrong marshalling and unmarshalling of invoke result with BinaryMarshaller
> --------------------------------------------------------------------------
>
> Key: IGNITE-2953
> URL: https://issues.apache.org/jira/browse/IGNITE-2953
> Project: Ignite
> Issue Type: Bug
> Reporter: Artem Shutak
>
> When {{CacheEntryProcessor.process()}} method called on remote node, then
> Ignite will serialize result of {{CacheEntryProcessor.process()}} to
> {{BinaryObject}} and then the {{BinaryObject}} will be deserialized or not on
> local node (which called invoke/invokeAll) depending on {{keepBinary}} flag
> of current operation ({{cache.withKeepBinary()}} or not).
> It's wrong behaviour for both withKeepBinary cache and not.
> Lets look at the following use caseы with invoke/invokeAll and
> BinaryMarshaller:
> # Cache.withKeepBinary
> #- {{CacheEntryProcessor.process()}} returns any user object (not
> BinaryObject)
> #- at this case user will get mixed user objects and {{BinaryObjects}}
> depending on what node processing was done (local and remote)
> # Cache without withKeepBinary
> #- {{CacheEntryProcessor.process()}} returns {{BinaryObject}} builded like
> {{ignite.binary().builder("MyObj").build()}}
> #- at this case user will get exception because Ignite will try deseriallize
> {{BinaryObject}}.
> Looks like we need to add one more flag at {{GridCacheReturn}} message to
> detect whether result should be converted from binary object or not (see
> org/apache/ignite/internal/processors/cache/GridCacheReturn.java:334,
> org/apache/ignite/internal/processors/cache/CacheInvokeDirectResult.java:91).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)