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

Sergey Kosarev edited comment on IGNITE-8449 at 10/8/18 11:04 AM:
------------------------------------------------------------------

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


was (Author: macrergate):
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)

Reply via email to