Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 978D1200B38 for ; Fri, 8 Jul 2016 17:20:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 964B4160A36; Fri, 8 Jul 2016 15:20:14 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E17E6160A5A for ; Fri, 8 Jul 2016 17:20:13 +0200 (CEST) Received: (qmail 89929 invoked by uid 500); 8 Jul 2016 15:20:11 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 89337 invoked by uid 99); 8 Jul 2016 15:20:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jul 2016 15:20:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 2ECED2C027F for ; Fri, 8 Jul 2016 15:20:11 +0000 (UTC) Date: Fri, 8 Jul 2016 15:20:11 +0000 (UTC) From: "Joshua McKenzie (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-12018) CDC follow-ups MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 08 Jul 2016 15:20:14 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-12018?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D15367801#comment-15367801 ]=20 Joshua McKenzie commented on CASSANDRA-12018: --------------------------------------------- bq. I would remove the secondary path here =E2=80=93 this could lead to dif= ferent results between the platforms as one will descend into subdirectorie= s and the other won't. My problem was with doing both listFiles and walkFil= eTree, 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 the= y should be volatile for writes to be made visible to threads other than th= e one writing. tempSize isn't informative enough. Maybe sizeInProgress, inc= ompleteSize or something similar? Renamed, and the lack of volatile was an oversight on my part. Thanks for c= atching 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.tolerateEr= rorsInSection =3D tolerateTruncation & syncSegment.toleratesErrorsInSection= (or make sure the segment reader does it when setting tolerateErrorsInSect= ion).=20 Changed and commented. > CDC follow-ups > -------------- > > Key: CASSANDRA-12018 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1201= 8 > 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::l= ength).sum();}} > h6. Refactor DirectorySizeCalculator > bq. I don't get the DirectorySizeCalculator. Why the alive and visited se= ts, the listFiles step? Either list the files and just loop through them, o= r do the walkFileTree operation =E2=80=93 you are now doing the same work t= wice. Use a plain long instead of the atomic as the class is still thread-u= nsafe. > h6. TolerateErrorsInSection should not depend on previous SyncSegment sta= tus in CommitLogReader > bq. tolerateErrorsInSection &=3D: I don't think it was intended for the v= alue to depend on previous iterations. > h6. Refactor interface of SImpleCachedBufferPool > bq. SimpleCachedBufferPool should provide getThreadLocalReusableBuffer(in= t 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 WriteTimeout= Exception > 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)