cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua McKenzie (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-12018) CDC follow-ups
Date Fri, 08 Jul 2016 15:20:11 GMT

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

Joshua McKenzie commented on CASSANDRA-12018:
---------------------------------------------

bq. I would remove the secondary path here – this could lead to different results between
the platforms as one will descend into subdirectories and the other won't. My problem was
with doing both listFiles and walkFileTree, which just doing the walk fixes in the better
way (less object churn). You can also remove the todo.
Todo removed, and I'm fine normalizing on a single path. While it's slower on linux than the
one-liner, we're splitting hairs if we're at 500 usec on worst-case vs. 400 in a local microbench
on a laptop.

bq. The size and unflushedCDCSize members do not need to be atomic, but they should be volatile
for writes to be made visible to threads other than the one writing. tempSize isn't informative
enough. Maybe sizeInProgress, incompleteSize or something similar?
Renamed, and the lack of volatile was an oversight on my part. Thanks for catching that.

bq. We still want the AND of global and section-specific flags, just not to carry it over
from one section to the other. I.e. statusTracker.tolerateErrorsInSection = tolerateTruncation
& syncSegment.toleratesErrorsInSection (or make sure the segment reader does it when setting
tolerateErrorsInSection). 
Changed and commented.

> CDC follow-ups
> --------------
>
>                 Key: CASSANDRA-12018
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12018
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Joshua McKenzie
>            Assignee: Joshua McKenzie
>            Priority: Minor
>
> h6. Platform independent implementation of DirectorySizeCalculator
> On linux, simplify to {{Arrays.stream(path.listFiles()).mapToLong(File::length).sum();}}
> h6. Refactor DirectorySizeCalculator
> bq. I don't get the DirectorySizeCalculator. Why the alive and visited sets, the listFiles
step? Either list the files and just loop through them, or do the walkFileTree operation –
you are now doing the same work twice. Use a plain long instead of the atomic as the class
is still thread-unsafe.
> h6. TolerateErrorsInSection should not depend on previous SyncSegment status in CommitLogReader
> bq. tolerateErrorsInSection &=: I don't think it was intended for the value to depend
on previous iterations.
> h6. Refactor interface of SImpleCachedBufferPool
> bq. SimpleCachedBufferPool should provide getThreadLocalReusableBuffer(int size) which
should automatically reallocate if the available size is less, and not expose a setter at
all.
> h6. Change CDC exception to WriteFailureException instead of WriteTimeoutException
> h6. Remove unused CommitLogTest.testRecovery(byte[] logData)
> h6. NoSpamLogger a message when at CDC capacity



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message