cassandra-commits mailing list archives

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

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

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.

|[patch|https://github.com/stef1927/cassandra/commits/12461]|[testall|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-12461-testall/]|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-12461-dtest/]|

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: https://issues.apache.org/jira/browse/CASSANDRA-12461
>             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
(v6.3.4#6332)

Mime
View raw message