cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefania (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-12509) Shutdown process triggered twice during if the node is drained
Date Tue, 04 Oct 2016 02:03:20 GMT


Stefania updated CASSANDRA-12509:
       Resolution: Fixed
    Fix Version/s: 3.10
           Status: Resolved  (was: Patch Available)

It seems that the dtest pull request is waiting for this patch in order to stabilize the test,
so I've committed this patch to 3.0 as 5115c106db198e684b47c614b237925c45c71da8 and merged
into 3.X and trunk.

Until the dtest P.R. is also merged, {{TestArchiveCommitlog.test_archive_commitlog_with_active_commitlog}}
will fail but it is already covered by a known failure and the P.R. is almost ready to be

> Shutdown process triggered twice during if the node is drained
> --------------------------------------------------------------
>                 Key: CASSANDRA-12509
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Alex Petrov
>            Assignee: Alex Petrov
>             Fix For: 3.0.10, 3.10
> If the node is drained, the {{StorageService#drain}} [method|]
is called, which triggers shutdown of mutation stage, messaging service, compaction, batchlog
etc. In the end of this process, the node is moved to {{DRAINED}} status with the process
still running. 
> When JVM is shutdown, the JVM shutdown hooks are ran, which are subscribed during the
server initialisation: {{Runtime.getRuntime().addShutdownHook(drainOnShutdown);}} [here|].

> I noticed this behaviour while reviewing [CASSANDRA-12461], as if we'd like add custom
pre and post-shutdown hooks, most likely it makes sense to run them once (or user might expect
such behaviour). 
> Is this behaviour correct? Should we run whole shutdown process twice or just once in
"drain" and no-op during JVM shutdown?  

This message was sent by Atlassian JIRA

View raw message