[ https://issues.apache.org/jira/browse/IGNITE-10017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16703189#comment-16703189 ]
Pavel Kovalenko commented on IGNITE-10017: ------------------------------------------ [~roman_s] Thank you for update. I think this happened because of outdated branch state. You've branched a month ago, many things changed from that time. You should merge fresh master to your branch and re-run tests again. I also noticed that you forgot to add reproducer to a test suite. I think IgniteCacheTestSuite will be the appropriate place for that. > 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 > Affects Versions: 2.6 > Reporter: Roman Shtykh > Assignee: Roman Shtykh > Priority: Critical > 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)