cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Jirsa (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-12776) when memtable flush Statistics thisOffHeap error
Date Wed, 12 Oct 2016 04:41:20 GMT

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

Jeff Jirsa updated CASSANDRA-12776:
-----------------------------------
    Description: 
{code}
if (largest != null)
            {
                float usedOnHeap = Memtable.MEMORY_POOL.onHeap.usedRatio();
                float usedOffHeap = Memtable.MEMORY_POOL.offHeap.usedRatio();
                float flushingOnHeap = Memtable.MEMORY_POOL.onHeap.reclaimingRatio();
                float flushingOffHeap = Memtable.MEMORY_POOL.offHeap.reclaimingRatio();
                float thisOnHeap = largest.getAllocator().onHeap().ownershipRatio();
                float thisOffHeap = largest.getAllocator().onHeap().ownershipRatio();
                logger.info("Flushing largest {} to free up room. Used total: {}, live: {},
flushing: {}, this: {}",
                            largest.cfs, ratio(usedOnHeap, usedOffHeap), ratio(liveOnHeap,
liveOffHeap),
                            ratio(flushingOnHeap, flushingOffHeap), ratio(thisOnHeap, thisOffHeap));
                largest.cfs.switchMemtableIfCurrent(largest);
            }
{code}

Should:

{code}
float thisOffHeap = largest.getAllocator().onHeap().ownershipRatio();
{code}

Be:

{{offHeap().ownershipRatio();}}

  was:
if (largest != null)
            {
                float usedOnHeap = Memtable.MEMORY_POOL.onHeap.usedRatio();
                float usedOffHeap = Memtable.MEMORY_POOL.offHeap.usedRatio();
                float flushingOnHeap = Memtable.MEMORY_POOL.onHeap.reclaimingRatio();
                float flushingOffHeap = Memtable.MEMORY_POOL.offHeap.reclaimingRatio();
                float thisOnHeap = largest.getAllocator().onHeap().ownershipRatio();
                float thisOffHeap = largest.getAllocator().onHeap().ownershipRatio();
                logger.info("Flushing largest {} to free up room. Used total: {}, live: {},
flushing: {}, this: {}",
                            largest.cfs, ratio(usedOnHeap, usedOffHeap), ratio(liveOnHeap,
liveOffHeap),
                            ratio(flushingOnHeap, flushingOffHeap), ratio(thisOnHeap, thisOffHeap));
                largest.cfs.switchMemtableIfCurrent(largest);
            }


 float thisOffHeap = largest.getAllocator().onHeap().ownershipRatio();
should offHeap().ownershipRatio();


> when memtable flush Statistics thisOffHeap error
> ------------------------------------------------
>
>                 Key: CASSANDRA-12776
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12776
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: 翟玉勇
>            Priority: Trivial
>
> {code}
> if (largest != null)
>             {
>                 float usedOnHeap = Memtable.MEMORY_POOL.onHeap.usedRatio();
>                 float usedOffHeap = Memtable.MEMORY_POOL.offHeap.usedRatio();
>                 float flushingOnHeap = Memtable.MEMORY_POOL.onHeap.reclaimingRatio();
>                 float flushingOffHeap = Memtable.MEMORY_POOL.offHeap.reclaimingRatio();
>                 float thisOnHeap = largest.getAllocator().onHeap().ownershipRatio();
>                 float thisOffHeap = largest.getAllocator().onHeap().ownershipRatio();
>                 logger.info("Flushing largest {} to free up room. Used total: {}, live:
{}, flushing: {}, this: {}",
>                             largest.cfs, ratio(usedOnHeap, usedOffHeap), ratio(liveOnHeap,
liveOffHeap),
>                             ratio(flushingOnHeap, flushingOffHeap), ratio(thisOnHeap,
thisOffHeap));
>                 largest.cfs.switchMemtableIfCurrent(largest);
>             }
> {code}
> Should:
> {code}
> float thisOffHeap = largest.getAllocator().onHeap().ownershipRatio();
> {code}
> Be:
> {{offHeap().ownershipRatio();}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message