[ 
https://issues.apache.org/jira/browse/CASSANDRA-16261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17264512#comment-17264512
 ] 

Ekaterina Dimitrova commented on CASSANDRA-16261:
-------------------------------------------------

Thank you both for your deep reviews and great suggestions.

3.0 is squashed and I propagated the changes to 3.11 and trunk.

I just started Jenkins runs too.

[3.0 PR |https://github.com/ekaterinadimitrova2/cassandra/pull/81] |  [Jenkins 
run |https://jenkins-cm4.apache.org/job/Cassandra-devbranch/286/]

[3.11 PR |https://github.com/ekaterinadimitrova2/cassandra/pull/83] |  [Jenkins 
run |https://jenkins-cm4.apache.org/job/Cassandra-devbranch/284/]

[trunk PR |https://github.com/ekaterinadimitrova2/cassandra/pull/83] |  
[Jenkins run |https://jenkins-cm4.apache.org/job/Cassandra-devbranch/285/] 

/CC [[email protected]] - this is the ticket we discussed offline. The new 
metric that needs to be documented is PendingFlushTasks. I believe the Metrics 
doc needs also other updates so maybe contact me when you start working on it 
and I can help there with revision, at least.

> Prevent unbounded number of flushing tasks
> ------------------------------------------
>
>                 Key: CASSANDRA-16261
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16261
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Legacy/Local Write-Read Paths
>            Reporter: Ekaterina Dimitrova
>            Assignee: Ekaterina Dimitrova
>            Priority: Normal
>             Fix For: 3.0.x, 3.11.x, 4.0-beta
>
>
> The cleaner thread is not prevented from queueing an unbounded number of 
> flushing tasks for memtables that are almost empty.
> This patch adds a mechanism to track the number of pending flushing
> tasks in the memtable cleaner. Above the maximum number (2x the flushing
> threads by default), only memtables using at least MCT memory will be
> flushed, where MCT stands for Memory Cleanup Threshold.
> This patch also fixes a possible problem tracking the memory marked as
> "reclaiming" in the memtable allocators and pool. Writes that complete
> only after a memtable has been scheduled for flushing, did not report
> their memory as reclaiming. Normally this should be a small value of no
> consequence, but if the flushing tasks are blocked for a long period,
> and there is a sufficient number of writes, or these writes use
> a sufficiently large quantity of memory, this would cause the memtable
> cleaning algorithm to schedule repeated flushing tasks because the used
> memory is always > reclaiming memory + MCT.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to