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

Piotr Kolaczkowski commented on CASSANDRA-16681:
------------------------------------------------

> The amount of time is sort of meaningless here, since nobody is looking at 
> it. 

I was referring to a few people to whom I showed the bug initially by saying 
"here, I have the evidence the MicroQueueOfChunks is being accessed from 
multiple threads" and the response was: 

"how so? I looked at the code and it looks correct".

For example here:

>  I can see only two locations invoking {{{}LocalPool.release{}}}: 
> {{LocalBufferPoolAllocator.release()}} and {{{}localPool.onRemoval{}}}. The 
> former invokes on its own private pool, and has only single ownership 
> semantics, and so should be fine. The latter should only be invoked when the 
> thread is terminating? It could in principle be invoked at another time, but 
> I do not think it is. Chunks are released only via this path, or when there 
> are no references to the chunk from application threads. So, if the above is 
> fine this is likely also fine?

;)

And BTW, that was also *my* initial reaction when I saw the exceptions for the 
first time and required many days until we figured this out. Hence I conclude, 
it was far from not obvious and wanted to make the code a bit more explicit so 
the next time noone has to figure this out again.

Anyway, let me get some time to split this patch into just the essential part 
and the nice-to-have cosmetic / simplification parts.

> org.apache.cassandra.utils.memory.LongBufferPoolTest - tests are flaky
> ----------------------------------------------------------------------
>
>                 Key: CASSANDRA-16681
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16681
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CI
>            Reporter: Ekaterina Dimitrova
>            Assignee: Piotr Kolaczkowski
>            Priority: Normal
>             Fix For: 3.11.x, 4.0.x, 4.x
>
>         Attachments: 0001-Fix-memoryInUse-counter-in-BufferPool.patch, 
> 0002-Multiple-fixes-in-BufferPool-and-LongBufferPoolTest.patch
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Jenkins history:
> [https://jenkins-cm4.apache.org/job/Cassandra-4.0/50/testReport/junit/org.apache.cassandra.utils.memory/LongBufferPoolTest/testPoolAllocateWithRecyclePartially/history/]
> Fails being run in a loop in CircleCI:
> https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/844/workflows/945011f4-00ac-4678-89f6-5c0db0a40169/jobs/5008
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to