ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ozerov (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (IGNITE-5038) BinaryMarshaller might need to use context class loader for deserialization
Date Wed, 23 Aug 2017 09:09:00 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-5038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16138113#comment-16138113
] 

Vladimir Ozerov edited comment on IGNITE-5038 at 8/23/17 9:09 AM:
------------------------------------------------------------------

[~v.pyatkov], my comments:
1) {{IgniteUtils.forName}} - {{noCache=true}} is ignored if passed classloader is null
2) {{GridBinaryMarshaller.unmarshal(..., ClassLoader)}} - why {{true}}? Looks like it should
depend on passed classloader

As a whole I am very concerned of passing {{noCache}} flag all over the code. Why do we need
it? As I understand, in order to understand whether cache should be used or not, we only need
node's classloader and current classloader. Node's classloader is always somewhere near. Let's
try to get rid of {{useCache}} as much as possible to minimize chance of error. We need clear
invariant here.


was (Author: vozerov):
[~v.pyatkov], my comments:
1) {{IgniteUtils.forName}} - {{noCache=true}} is ignored if passed classloader is null
2) {{GridBinaryMarshaller.unmarshal(..., ClassLoader)}} - why {{true}}? Looks like it should
depend on passed classloader

As a whole I am very concerned of passing {{true}} flag all over the code. Why do we need
it? As I understand, in order to understand whether cache should be used or not, we only need
node's classloader and current classloader. Node's classloader is always somewhere near. Let's
try to get rid of {{useCache}} as much as possible to minimize chance of error. We need clear
invariant here.

> BinaryMarshaller might need to use context class loader for deserialization
> ---------------------------------------------------------------------------
>
>                 Key: IGNITE-5038
>                 URL: https://issues.apache.org/jira/browse/IGNITE-5038
>             Project: Ignite
>          Issue Type: New Feature
>          Components: cache
>    Affects Versions: 2.0
>            Reporter: Dmitry Karachentsev
>            Assignee: Vladislav Pyatkov
>              Labels: features
>             Fix For: 2.2
>
>         Attachments: results-compound-20170802.zip, results-compound-20170808.zip
>
>
> There is a special use case discussed on the dev list:
> http://apache-ignite-developers.2346864.n4.nabble.com/Re-BinaryObjectImpl-deserializeValue-with-specific-ClassLoader-td17126.html#a17224
> According to the use case, BinaryMarshaller might need to try to deserialize an object
using a context class loader if it failed to do so with a custom classloader (`IgniteConfiguration.getClassLoader()`)
or the system one.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message