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

2016-02-08 Thread jiafu1115
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


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

2016-01-26 Thread jiafu1115
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


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

2016-01-26 Thread jiafu1115
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


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

2016-01-26 Thread jiafu1115
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


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

2016-01-26 Thread jiafu1115
Github user jiafu1115 commented on the pull request:

https://github.com/apache/cassandra/pull/62#issuecomment-175313381
  

![ss](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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


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

2016-01-25 Thread jiafu1115
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 <fujian1...@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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---