[
https://issues.apache.org/jira/browse/CASSANDRA-12018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15367540#comment-15367540
]
Branimir Lambov commented on CASSANDRA-12018:
---------------------------------------------
bq. Done.
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|https://github.com/apache/cassandra/compare/trunk...josh-mckenzie:12018#diff-878dc31866184d5ef750ccd9befc8382R163].
bq. Cleaned up.
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?
bq. Removed &
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}}).
> 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)