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

[jira] [Commented] (IGNITE-8449) Avoid empty acquiring/releasing checkpointReadLock for stale updates

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

Sergey Kosarev commented on IGNITE-8449:
----------------------------------------

I realized my changes may cause deadlocks as lock are taken in another way. So It looks like my idea about optimisation can't  be realized.

> Avoid empty acquiring/releasing checkpointReadLock for stale updates
> --------------------------------------------------------------------
>
>                 Key: IGNITE-8449
>                 URL: https://issues.apache.org/jira/browse/IGNITE-8449
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Sergey Kosarev
>            Assignee: Sergey Kosarev
>            Priority: Major
>
> we have in
> org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopologyImpl#update(org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionExchangeId, org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap, boolean)
> currently we have something like this
> {code:java}
>        ctx.database().checkpointReadLock();
>         try {
> .......
>             if (isStaleUpdate(cur, parts)) {
>                 ....
>                 return false;
>             }
> .....
>         }
>         finally {
>             ctx.database().checkpointReadUnlock();
>         }
>  {code}
> we'd better do not  accquire those lock for isStaleUpdate == true branch. It can significantly decrease contention as this method can be hot (thousands invocations per minute) see also IGNITE-8226
>  



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