You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Alexey Goncharuk (JIRA)" <ji...@apache.org> on 2018/04/02 08:27:00 UTC

[jira] [Commented] (IGNITE-8018) Avoid unnecessary unswap(...) call in GridCacheMapEntry.initialValue(...)

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

Alexey Goncharuk commented on IGNITE-8018:
------------------------------------------

[~ilantukh],

Why did you split the store logic into two paths - with invoke and without? Why do we need to check for val != null? Null values still can be rebalanced (at least for now) and I think the same logic can be applied to this case. A large portion of code became duplicated and harder to maintain and read - we should try to avoid this branching and handle everything inside the predicate.

> Avoid unnecessary unswap(...) call in GridCacheMapEntry.initialValue(...)
> -------------------------------------------------------------------------
>
>                 Key: IGNITE-8018
>                 URL: https://issues.apache.org/jira/browse/IGNITE-8018
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Ilya Lantukh
>            Assignee: Ilya Lantukh
>            Priority: Major
>              Labels: iep-16
>             Fix For: 2.5
>
>
> GridCacheMapEntry.initialValue(...) method executes unswap(...) to read entry version from PageMemory, but then it also executes storeValue(...) which writes new value if entry is obsolete. It means that the same entry is searched in PageMemory twice, which is not optimal.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)