[ 
https://issues.apache.org/jira/browse/IGNITE-10017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavel Kovalenko resolved IGNITE-10017.
--------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.8

> Infinite loop with 3rd party persistency and no value for the key in the data 
> store
> -----------------------------------------------------------------------------------
>
>                 Key: IGNITE-10017
>                 URL: https://issues.apache.org/jira/browse/IGNITE-10017
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>    Affects Versions: 2.6
>            Reporter: Roman Shtykh
>            Assignee: Roman Shtykh
>            Priority: Critical
>             Fix For: 2.8
>
>         Attachments: IgniteGetBinaryKeyReadThroughSelfTest.java
>
>
> Basically, it happens because _GridCacheAdapter#clearReservationsIfNeeded_ 
> fails to clear its local map.
>  
> The problem occurs when _IgniteBiTuple_ is used as a key, but the value for 
> the key is not available. The execution path goes through 
> _GridDhtCacheAdapter#getDhtAllAsync_ -> _GridCacheAdapter#getAllAsync0_, for 
> instance if you have an affinityCall and execute get() from within.
>  
> What happens is
>  # On get operation, keys are stored in the local map of _GridCacheAdapter_. 
> For this, _UserKeyCacheObjectImpl#prepareForCache_ creates 
> _KeyCacheObjectImpl_ with an unmarshalled val (BinaryObject), which is 
> different from that of _UserKeyCacheObjectImpl_ (val is BiTuple here) that is 
> used further as a key to retrieve the value from the map.
>  # _GridCacheAdapter#clearReservationsIfNeeded_ is called to clear the map 
> from keys for which values were not found. It uses _UserKeyCacheObjectImpl_ 
> to check the map, but can’t peek and remove even if the key is in the map 
> (hashes won’t match). The key is left in the map.
>  # The problem comes with the 2nd get:
>  - we check if the key is not in the map and create a new one, then BOOM! 
> loops while _putIfAbsent == null_ succeeds (but it won’t)
> All these data types are ok – 
> [https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java#L212-L239]
>  



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

Reply via email to