ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Kosarev (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IGNITE-8449) Avoid empty acquiring/releasing checkpointReadLock for stale updates
Date Tue, 08 May 2018 05:21:00 GMT

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

Sergey Kosarev updated IGNITE-8449:
-----------------------------------
    Description: 
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 decrease
contention as this method is hot (thousandsa invocations per minute) see 

 

> 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
>            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 decrease
contention as this method is hot (thousandsa invocations per minute) see 
>  



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

Mime
View raw message