cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefania (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-12461) Add hooks to StorageService shutdown
Date Thu, 29 Sep 2016 03:46:21 GMT


Stefania commented on CASSANDRA-12461:

It LGTM, with these two changes:

* I ill advised you yesterday regarding replacing the boolean with the operating mode, because
we are not updating it atomically and we are not guarding against unwanted transitions, due
to some bug somewhere, e.g. DRAINED -> DECOMMISSIONED or DRAINED -> NORMAL. I did not
want to handle all this and check all the callers of {{setMode}} and so I've reintroduced
the boolean, I merely renamed it to {{isShutdown}}.

* I think we could have races if we check that a node is drained before starting a service
with two JMX calls. I move the check in the SS methods and made them synchronized.


Let me know if you are OK with these two changes, if so, should we also back-port to 3.0?

> Add hooks to StorageService shutdown
> ------------------------------------
>                 Key: CASSANDRA-12461
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Anthony Cozzie
>            Assignee: Anthony Cozzie
>             Fix For: 3.x
>         Attachments: 0001-CASSANDRA-12461-add-C-support-for-shutdown-runnables.patch
> The JVM will usually run shutdown hooks in parallel.  This can lead to synchronization
problems between Cassandra, services that depend on it, and services it depends on.  This
patch adds some simple support for shutdown hooks to StorageService.
> This should nearly solve CASSANDRA-12011

This message was sent by Atlassian JIRA

View raw message