[
https://issues.apache.org/jira/browse/CASSANDRA-1919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
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:
{noformat}
[junit] Testsuite: org.apache.cassandra.auth.SimpleAuthorityTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.076 sec
[junit]
[junit] Testsuite: org.apache.cassandra.cli.CliTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 1.136 sec
[junit]
[junit] ------------- Standard Error -----------------
[junit] WARN 23:31:54,490 Generated random token
Token(bytes[761bf80745d12d316f77fbb493168428]). Random tokens will result in an
unbalanced ring; see http://wiki.apache.org/cassandra/Operations
[junit] ------------- ---------------- ---------------
[junit] Testcase: testCli(org.apache.cassandra.cli.CliTest): Caused
an ERROR
[junit] Unable to create thrift socket to /127.0.0.1:9170
[junit] java.io.IOException: Unable to create thrift socket to
/127.0.0.1:9170
[junit] at
org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:72)
[junit] at
org.apache.cassandra.service.AbstractCassandraDaemon.init(AbstractCassandraDaemon.java:207)
[junit] at
org.apache.cassandra.service.EmbeddedCassandraService.init(EmbeddedCassandraService.java:64)
[junit] at org.apache.cassandra.cli.CliTest.setup(CliTest.java:219)
[junit] at org.apache.cassandra.cli.CliTest.testCli(CliTest.java:149)
[junit] Caused by: org.apache.thrift.transport.TTransportException: Could
not create ServerSocket on address /127.0.0.1:9170.
[junit] at
org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:99)
[junit] at
org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:85)
[junit] at
org.apache.cassandra.thrift.TCustomServerSocket.<init>(TCustomServerSocket.java:59)
[junit] at
org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:65)
{noformat}
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: https://issues.apache.org/jira/browse/CASSANDRA-1919
> 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.