cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "fujian (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-11070) Dispatcher.Flusher's control has duplicated/conflict control
Date Tue, 26 Jan 2016 03:36:40 GMT

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

fujian updated CASSANDRA-11070:
-------------------------------
    Description: 
org.apache.cassandra.transport.Message.Dispatcher.Flusher

remove duplicated control for flush message control …

Motivation:

the !doneWork's control is duplicated and confused with runsSinceFlush > 2

if on the first run:the queue size is 20
donework will be set to true and not do flush due to the size<50 and runsSinceFlush<2.

if on the second run. the queue size is 0,
donework will be reset to false and not set to true due to no new items in queue, but the
flush will be triggered due to:
  if (!doneWork || runsSinceFlush > 2 || flushed.size() > 50)
now the runsSinceFlush is 2. so in actual, its function is similar with runsSinceFlush>1.
so it is no need to keep it so that the code is confused and duplicated.
              

Modifications:

remove it

Result:

after remove it, it will more clear and no confused.

check the link: https://github.com/jiafu1115/cassandra/commit/5279884e6a392d36b4adc5e29f9ca5d0666cb275

  was:

org.apache.cassandra.transport.Message.Dispatcher.Flusher

remove duplicated control for flush message control …

Motivation:

the !doneWork's control is duplicated and confused with runsSinceFlush > 2

if on the first run:the queue size is 20
donework will be set to true and not do flush due to the size<50 and runsSinceFlush<2.

if on the second run. the queue size is 0,
donework will be reset to false and not set to true due to no new items in queue, but the
flush will be triggered due to:
  if (!doneWork || runsSinceFlush > 2 || flushed.size() > 50)
now the runsSinceFlush is 2. so in actual, its function is similar with runsSinceFlush>1.
so it is no need to keep it so that the code is confused and duplicated.
              

Modifications:

remove it

Result:

after remove it, it will more clear and no confused.


> Dispatcher.Flusher's control has duplicated/conflict control
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-11070
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11070
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Streaming and Messaging
>            Reporter: fujian
>              Labels: performance
>
> org.apache.cassandra.transport.Message.Dispatcher.Flusher
> remove duplicated control for flush message control …
> Motivation:
> the !doneWork's control is duplicated and confused with runsSinceFlush > 2
> if on the first run:the queue size is 20
> donework will be set to true and not do flush due to the size<50 and runsSinceFlush<2.
> if on the second run. the queue size is 0,
> donework will be reset to false and not set to true due to no new items in queue, but
the flush will be triggered due to:
>   if (!doneWork || runsSinceFlush > 2 || flushed.size() > 50)
> now the runsSinceFlush is 2. so in actual, its function is similar with runsSinceFlush>1.
> so it is no need to keep it so that the code is confused and duplicated.
>               
> Modifications:
> remove it
> Result:
> after remove it, it will more clear and no confused.
> check the link: https://github.com/jiafu1115/cassandra/commit/5279884e6a392d36b4adc5e29f9ca5d0666cb275



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

Mime
View raw message