cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Cozzie (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-12461) Add hooks to StorageService shutdown
Date Mon, 15 Aug 2016 15:52:20 GMT


Anthony Cozzie commented on CASSANDRA-12461:

  * Wrapping the hooks on insertion leads to some nice code in the shutdown hook, but it means
we can't easily remove the hooks once we add them.  If this is important, it can be changed
pretty easily.
  * The implementation uses synchronized blocks rather than CopyOnWriteArrayList.  This lets
callers know if Cassandra shut down before they could add their hook.  I don't know if this
is important enough to worry about; we could just punt here and simplify the code.
  * I didn't write any unit tests.  Hopefully the code is simply enough to just reason about,
and I don't know of a simple way to unit test this (it would be difficult to add hooks in
a dtest, verifying the order in a non-brittle way seems difficult, and Cassandra doesn't seem
to have a good way to boot up full nodes in unit tests, as this is mostly a bad idea).

> Add hooks to StorageService shutdown
> ------------------------------------
>                 Key: CASSANDRA-12461
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Anthony Cozzie
>            Assignee: Anthony Cozzie
>         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