[ https://issues.apache.org/jira/browse/IGNITE-6736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16295134#comment-16295134 ]
ASF GitHub Bot commented on IGNITE-6736: ---------------------------------------- GitHub user andrey-kuznetsov opened a pull request: https://github.com/apache/ignite/pull/3248 IGNITE-6736: Switched GridCacheMapEntry synchronization to locks. For test purpose You can merge this pull request into a Git repository by running: $ git pull https://github.com/andrey-kuznetsov/ignite ignite-6736 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/ignite/pull/3248.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3248 ---- commit 009e8710779355feb375ce63a60a24f12900c761 Author: Andrey Kuznetsov <stku...@gmail.com> Date: 2017-12-18T15:36:01Z IGNITE-6736: Switched GridCacheMapEntry synchronization to locks. ---- > Java 9: rework GridCacheMapEntry synchronization logic to avoid > Unsafe.monitor* methods > --------------------------------------------------------------------------------------- > > Key: IGNITE-6736 > URL: https://issues.apache.org/jira/browse/IGNITE-6736 > Project: Ignite > Issue Type: Task > Components: cache > Reporter: Vladimir Ozerov > Assignee: Andrey Kuznetsov > Fix For: 2.4 > > > {{GridCacheMapEntry}} class rely on {{synchronized}} on itself heavily. In > {{ATOMIC}} caches we lock multiple entries at once using > {{Unsafe.monitorEnter/Exit}} methods. Unfortunately these methods were > removed in Java 9. Recursion is not an option, as it would cause stack > overflow for {{putAll}} operations with multiple entries. > Possible fixes: > 1) Rework {{synchronized}} to {{ReentrantLock}}. Easy, but may cause > additional memory pressure. > 2) Have different implementations for Java 8 ({{synchronzied}}) and Java 9 > ({{ReentrantLock}}) - much more complex solution, because we will require > separate module for Java 8 and Java 9. > 3) Rework {{ATOMIC}} caches, so that {{putAll}} operation updates entries > one-by-one. As a side effect it will eliminate deadlocks. -- This message was sent by Atlassian JIRA (v6.4.14#64029)