cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Spriegel (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-5704) Truncate flushes to disk again in 1.2, even with durable_writes=false
Date Wed, 17 Jul 2013 23:24:48 GMT

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

Christian Spriegel edited comment on CASSANDRA-5704 at 7/17/13 11:23 PM:
-------------------------------------------------------------------------

[~jbellis], [~brandon.williams]: I'm fine with a property. Thanks!

Is there any chance we can make it a "cassandra.unsafesystem"-property and apply the same
behaviour to all system table operations? This would then also speed up schema changes, which
are are also a pain for tests.

FWIW: I attached a patch which works nicely for me.

Update: Perhaps as a separate 2.0 ticket?

                
      was (Author: christianmovi):
    [~jbellis], [~brandon.williams]: I'm fine with a property. Thanks!

Is there any chance we can make it a "cassandra.unsafesystem"-property and apply the same
behaviour to all system table operations? This would then also speed up schema changes, which
are are also a pain for tests.

FWIW: I attached a patch which works nicely for me.

                  
> Truncate flushes to disk again in 1.2, even with durable_writes=false
> ---------------------------------------------------------------------
>
>                 Key: CASSANDRA-5704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5704
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.5
>            Reporter: Christian Spriegel
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 1.2.7, 2.0 beta 2
>
>         Attachments: 5704_unsafeSystem.txt, 5704-v2.txt, CASSANDRA_5704_V1_1_2.patch,
CASSANDRA_5704_V1_trunk.patch
>
>
> I just upgraded my dev-environment to C* 1.2. Unfortunetaly 1.2 makes my JUnit tests
slow again, due to a blocking-flush in saveTruncationRecord().
> With Cassandra 1.1 truncate was very fast due to: CASSANDRA-4153
> My proposal is to make saveTruncationRecord() only flush when durableWrites are enabled.
> My assumption is that if somebody turn off durable writes then he does not mind if truncate
is not guaranteed to be durable either.
> I successfully tested the following patch with my testsuite. Its as fast as it was with
1.1 (maybe even faster!):
> {code}
> @@ -186,5 +186,8 @@ public class SystemTable
>          String req = "UPDATE system.%s SET truncated_at = truncated_at + %s WHERE key
= '%s'";
>          processInternal(String.format(req, LOCAL_CF, truncationAsMapEntry(cfs, truncatedAt,
position), LOCAL_KEY));
> -        forceBlockingFlush(LOCAL_CF);
> +        
> +        KSMetaData ksm = Schema.instance.getKSMetaData(cfs.table.name);
> +        if (ksm.durableWrites) // flush only when durable_writes are enabled
> +            forceBlockingFlush(LOCAL_CF);
>      }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message