cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <>
Subject [jira] Updated: (CASSANDRA-1919) Add shutdownhook to flush commitlog
Date Tue, 25 Jan 2011 05:40:43 GMT


Jonathan Ellis updated CASSANDRA-1919:

    Attachment: 1919.txt

The approach I took was to add a shutdownBlocking to CommitLog (that in turn shuts down the
CL executor; the code to enable this is most of the patch), have drain call CL.shutdownBlocking,
and add a shutdown hook to call drain.

This looks like it works fine in standalone tests but it breaks the hell out of the test suite.
 Not sure what's going on:

    [junit] Testsuite: org.apache.cassandra.auth.SimpleAuthorityTest
    [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.076 sec
    [junit] Testsuite: org.apache.cassandra.cli.CliTest
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 1.136 sec
    [junit] ------------- Standard Error -----------------
    [junit]  WARN 23:31:54,490 Generated random token Token(bytes[761bf80745d12d316f77fbb493168428]).
Random tokens will result in an unbalanced ring; see
    [junit] ------------- ---------------- ---------------
    [junit] Testcase: testCli(org.apache.cassandra.cli.CliTest):	Caused an ERROR
    [junit] Unable to create thrift socket to /
    [junit] Unable to create thrift socket to /
    [junit] 	at org.apache.cassandra.thrift.CassandraDaemon.setup(
    [junit] 	at org.apache.cassandra.service.AbstractCassandraDaemon.init(
    [junit] 	at org.apache.cassandra.service.EmbeddedCassandraService.init(
    [junit] 	at org.apache.cassandra.cli.CliTest.setup(
    [junit] 	at org.apache.cassandra.cli.CliTest.testCli(
    [junit] Caused by: org.apache.thrift.transport.TTransportException: Could not create ServerSocket
on address /
    [junit] 	at org.apache.thrift.transport.TServerSocket.<init>(
    [junit] 	at org.apache.thrift.transport.TServerSocket.<init>(
    [junit] 	at org.apache.cassandra.thrift.TCustomServerSocket.<init>(
    [junit] 	at org.apache.cassandra.thrift.CassandraDaemon.setup(

First test runs fine, second errors out because (I'm guessing from the error message) the
first JVM is still hanging around, and the third test doesn't start at all, even long after
the junit timeout.

> Add shutdownhook to flush commitlog
> -----------------------------------
>                 Key: CASSANDRA-1919
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.7.1
>         Attachments: 1919.txt
>   Original Estimate: 4h
>  Remaining Estimate: 4h
> this replaces the periodic_with_flush approach from CASSANDRA-1780 / CASSANDRA-1917

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message