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

Benjamin Lerer commented on CASSANDRA-14566:
--------------------------------------------

[~pougetat] Sorry for the delay.
I had a look to the patch and I have the following comments:
# The {{onlyPurgeRepTomb}} variable visibily across threads is not guarantee as 
{{setStrategy}} calls are guarded by the {{writeLock}} but calls to 
{{onlyPurgeRepairedTombstones}} are not guarded by any lock and the variable is 
not volatile.
# I am not super familiar with the compaction part of the code base but I 
believe that we should guarante that the {{params}} and the cached value should 
be set together to guaranty thread safety.

I will put the ticket back in {{open}} state. Do not hesitate to put it back in 
{{Patch Available}} once the comments have been addressed. 


> Cache CSM.onlyPurgeRepairedTombstones()
> ---------------------------------------
>
>                 Key: CASSANDRA-14566
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14566
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Local/Compaction
>            Reporter: Stefan Podkowinski
>            Assignee: Thomas Pouget-Abadie
>            Priority: Low
>              Labels: lhf, performance
>         Attachments: 14566-3.11.txt
>
>
> We currently call {{CompactionStrategyManager.onlyPurgeRepairedTombstones()}} 
> *a lot* during compaction, I think at least for every key. So we should 
> probably cache the value, instead of constantly reading from a volatile and 
> calling parseBoolean.



--
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