ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Valentin Kulichenko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-4293) Deserialized value is cached if queries are enabled
Date Mon, 19 Dec 2016 20:30:58 GMT

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

Valentin Kulichenko commented on IGNITE-4293:

[~ein], to be honest, it looks like you're complicating this a bit :)

Basically, the main issue here is {{CacheObjectBinaryProcessorImpl.contextForCache()}} method
implementation which is incorrect. For some reason it calls {{super.contextForCache()}} first
and then creates another instance of {{CacheObjectContext}} preserving values of {{cpyOnGet}}
and {{storeVal}} flags. Instead, it should define these flags by itself making sure that they
are correct from binary format standpoint. In particular, with binary marshaller there is
no reason to cache deserialized objects when SQL is enabled (actually, that's what this ticket
is about and it's a pretty serious bug, so let's fix it first and then create new tickets
if there is anything else that should be improved).

> Deserialized value is cached if queries are enabled
> ---------------------------------------------------
>                 Key: IGNITE-4293
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4293
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>    Affects Versions: 1.7
>            Reporter: Valentin Kulichenko
>            Assignee: Alexandr Kuramshin
>            Priority: Critical
> Here is the problematic piece of code in {{IgniteCacheObjectProcessorImpl}}:
> {code}
> boolean storeVal = ctx.config().isPeerClassLoadingEnabled() ||
>     GridQueryProcessor.isEnabled(ccfg) ||
>     !ccfg.isCopyOnRead();
> {code}
> This flag is set to true if queries are enabled even when binary marshaller is used (this
condition makes sense to other marshallers though). It is then use in {{BinaryObjectImpl.deserializeValue}}:
> {code}
> if (coCtx != null && coCtx.storeValue())
>     obj = obj0;
> {code}
> As a result, memory consumption doubles.

This message was sent by Atlassian JIRA

View raw message