ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Kuznetsov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-6083) Null value have appear in the entry processor, but the entry is existing
Date Tue, 20 Feb 2018 15:39:00 GMT

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

Alexey Kuznetsov commented on IGNITE-6083:

[~agoncharuk] when first entry processor is called in tx#enlistWriteEntry(), cache entry
is pulled from cache by entry.innerGet(). 
 So first entry processor observes non-null value [see source|https://github.com/voipp/ignite/blob/49cd833eed456917b4435fc12ffcce6a689dcccc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java#L1319].
This value _*would not be saved*_ in IgniteTxEntry.

When entry processor is called a second time, it gets value from IgniteTxEntry#value , which
is null, because we didn't set any value at first call.


PS. It seems odd, that entry processor is called multiple times : before transaction commit
and during prepare phase(after locks are aquired).

And the value is set on finish phase in innerSet. I think, we can call only once : before
commit, and save the value in Tx entry.

> Null value have appear in the entry processor, but the entry is existing
> ------------------------------------------------------------------------
>                 Key: IGNITE-6083
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6083
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>    Affects Versions: 2.1
>            Reporter: Vladislav Pyatkov
>            Assignee: Alexey Kuznetsov
>            Priority: Major
>         Attachments: EntryProcessorInOptimisticTxTest.java
> In one thread load some data in a cache, after that I have execute OPTIMISTIC, SERIALIZABLE
transaction with two {{IgniteCache.invoke()}} methods.
> The value had been corrected at first {{EntryProcessor}}, but it is NULL at second.

This message was sent by Atlassian JIRA

View raw message