You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by jiafu1115 <gi...@git.apache.org> on 2016/01/26 02:21:27 UTC

[GitHub] cassandra pull request: remove duplicated control for flush mesage...

GitHub user jiafu1115 opened a pull request:

    https://github.com/apache/cassandra/pull/62

    remove duplicated control for flush mesage 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.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jiafu1115/cassandra trunk

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cassandra/pull/62.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #62
    
----
commit 5279884e6a392d36b4adc5e29f9ca5d0666cb275
Author: fu.jian <fu...@gmail.com>
Date:   2016-01-26T01:20:05Z

    remove duplicated control for flush mesage 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.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cassandra pull request: remove duplicated control for flush mesage...

Posted by jiafu1115 <gi...@git.apache.org>.
Github user jiafu1115 closed the pull request at:

    https://github.com/apache/cassandra/pull/62


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cassandra pull request: remove duplicated control for flush mesage...

Posted by jiafu1115 <gi...@git.apache.org>.
Github user jiafu1115 commented on the pull request:

    https://github.com/apache/cassandra/pull/62#issuecomment-174888659
  
    @blerer  I had request in https://issues.apache.org/jira/browse/CASSANDRA-11070, can you take a look? 3ks


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cassandra pull request: remove duplicated control for flush mesage...

Posted by jiafu1115 <gi...@git.apache.org>.
Github user jiafu1115 commented on the pull request:

    https://github.com/apache/cassandra/pull/62#issuecomment-175313210
  
    ![issue](https://cloud.githubusercontent.com/assets/5654180/12599934/c8fc8060-c4d0-11e5-8d12-d4399dde8a2d.jpg)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cassandra pull request: remove duplicated control for flush mesage...

Posted by jiafu1115 <gi...@git.apache.org>.
Github user jiafu1115 commented on the pull request:

    https://github.com/apache/cassandra/pull/62#issuecomment-175313381
  
    ![ssssssssssssssssssssss](https://cloud.githubusercontent.com/assets/5654180/12599960/ede28bcc-c4d0-11e5-9a2a-5ebd68ced78b.jpg)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cassandra pull request: remove duplicated control for flush mesage...

Posted by blerer <gi...@git.apache.org>.
Github user blerer commented on the pull request:

    https://github.com/apache/cassandra/pull/62#issuecomment-174888193
  
    Hi,
    
    This repository is just a mirror and does not accept pull requests.
    Could you open a JIRA ticket and attach your patch to it?
    
    Thanks


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cassandra pull request: remove duplicated control for flush mesage...

Posted by jiafu1115 <gi...@git.apache.org>.
Github user jiafu1115 commented on the pull request:

    https://github.com/apache/cassandra/pull/62#issuecomment-175311128
  
     
    ![issue](https://cloud.githubusercontent.com/assets/5654180/12599801/c7464b3a-c4cf-11e5-8004-9e2957360cb7.jpg)
    
     
     
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---