cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (Updated) (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-3388) StorageService.setMode() is used inconsistently
Date Tue, 25 Oct 2011 17:28:32 GMT


Sylvain Lebresne updated CASSANDRA-3388:

    Attachment: 3388_v2.patch

Yeah right. I was going with the 'smallest diff' approach but I agree we can make that cleaner.
v2 does so by adding a Mode enumeration. A few details (that I think are ok but are worth
* the patch changes the semantic of the getOperationMode JMX attribute to only return the
"mode", not the message part. It can be changed back but I'm not sure the message is really
useful outside of the log itself and it feels slightly cleaner that way.
* the modes are in caps. Again, feels more simple, natural but that can change.
* I've changed the last "mode" from Draining to Drained. Feels more useful/right that way.
> StorageService.setMode() is used inconsistently
> -----------------------------------------------
>                 Key: CASSANDRA-3388
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>            Reporter: Tyler Hobbs
>            Priority: Trivial
>             Fix For: 1.0.2
>         Attachments: 3388.patch, 3388_v2.patch
> {{StorageService.setMode()}}, which ends up setting the OperationMode attribute of the
related mbean, is used inconsistently.  In most places, it's used like "{{setMode("MODE: details")}},
but in a few places, it's used more like a normal log message.
> To make this attribute more usable through JMX, {{setMode()}} should have a signature
like {{setMode(mode, details)}}, where the mode parameter could be an enum (or even just a
string, the main thing is just being consistent).  The OperationMode JMX attribute should
definitely remain a string, though.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message