cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Bale (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-13121) repair progress message breaks legacy JMX support
Date Fri, 13 Jan 2017 18:08:26 GMT

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

Scott Bale commented on CASSANDRA-13121:
----------------------------------------

Note also the comment elsewhere in {{RepairRunnable}}:
{code}
                public void onFailure(Throwable t)
                {
                    /**
                     * If the failure message below is modified, it must also be updated on
                     * {@link org.apache.cassandra.utils.progress.jmx.LegacyJMXProgressSupport}
                     * for backward-compatibility support.
                     */
                    String message = String.format("Repair session %s for range %s failed
with error %s",
                                                   session.getId(), session.getRange().toString(),
t.getMessage());

{code}
https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/repair/RepairRunnable.java#L269

> repair progress message breaks legacy JMX support
> -------------------------------------------------
>
>                 Key: CASSANDRA-13121
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13121
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Streaming and Messaging
>            Reporter: Scott Bale
>            Priority: Minor
>
> The error progress message in {{RepairRunnable}} is not compliant with the {{LegacyJMXProgressSupport}}
class, which uses a regex to match on the text of a progress event. Therefore, actual failures
slip through as successes if using legacy JMX for repairs.
> In {{RepairRunnable}}
> {code}
>     protected void fireErrorAndComplete(String tag, int progressCount, int totalProgress,
String message)
>     {
>         fireProgressEvent(tag, new ProgressEvent(ProgressEventType.ERROR, progressCount,
totalProgress, message));
>         fireProgressEvent(tag, new ProgressEvent(ProgressEventType.COMPLETE, progressCount,
totalProgress, String.format("Repair command #%d finished with error", cmd)));
>     }
> {code}
> Note the {{"Repair command #%d finished with error"}}
> See https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/repair/RepairRunnable.java#L109
> In {{LegacyJMXProgressSupport}}:
> {code}
>     protected static final Pattern SESSION_FAILED_MATCHER = Pattern.compile("Repair session
.* for range .* failed with error .*");
>     protected static final Pattern SESSION_SUCCESS_MATCHER = Pattern.compile("Repair
session .* for range .* finished");
> {code}
> See https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/utils/progress/jmx/LegacyJMXProgressSupport.java#L38
> Legacy JMX support was introduced for CASSANDRA-11430 (version 2.2.6) and the bug was
introduced as part of CASSANDRA-12279 (version 2.2.8).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message