[
https://issues.apache.org/jira/browse/CASSANDRA-11430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15227088#comment-15227088
]
Paulo Motta commented on CASSANDRA-11430:
-----------------------------------------
Added backward support to repair notifications on deprecated methods via
{{LegacyJMXProgressSupport}} that convert new notification messages into the
old format. Notifications on the old format are only sent if the deprecated
methods are used. Even though status will be backward compatible, message
content might change, but I think it shouldn't be a big deal.
The following conversions are done:
{{ProgressEventType.START}} -> {{ActiveRepairService.Status.STARTED}}
{{ProgressEventType.COMPLETE}} -> {{ActiveRepairService.Status.FINISHED}}
{{ProgressEventType.PROGRESS}} -> {{ActiveRepairService.Status.SESSION_FAILED}}
when {{message ~ "Repair session %s for range %s failed with error %s"}}
{{ProgressEventType.PROGRESS}} ->
{{ActiveRepairService.Status.SESSION_SUCCESS}} when {{message ~ "Repair session
%s for range %s finished"}}
The following events in the new format are *NOT* translated to the old format,
since they don't have analogous types:
{{ProgressEventType.ERROR}}, {{ProgressEventType.ABORT}},
{{ProgressEventType.SUCCESS}}, {{ProgressEventType.NOTIFICATION}},
Added unit tests to check that conversions are working as expected. Tested
locally with cassandra-2.1 nodetool with session failures and success and seems
to work.
[~nickmbailey] can you double check it's working as expected?
Patch and tests below:
||2.2||3.0||trunk||
|[branch|https://github.com/apache/cassandra/compare/cassandra-2.2...pauloricardomg:2.2-11430]|[branch|https://github.com/apache/cassandra/compare/cassandra-3.0...pauloricardomg:3.0-11430]|[branch|https://github.com/apache/cassandra/compare/trunk...pauloricardomg:trunk-11430]|
|[testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-2.2-11430-testall/lastCompletedBuild/testReport/]|[testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-3.0-11430-testall/lastCompletedBuild/testReport/]|[testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-trunk-11430-testall/lastCompletedBuild/testReport/]|
|[dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-2.2-11430-dtest/lastCompletedBuild/testReport/]|[dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-3.0-11430-dtest/lastCompletedBuild/testReport/]|[dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-trunk-11430-dtest/lastCompletedBuild/testReport/]|
> Add legacy notifications backward-support on deprecated repair methods
> ----------------------------------------------------------------------
>
> Key: CASSANDRA-11430
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11430
> Project: Cassandra
> Issue Type: Bug
> Reporter: Nick Bailey
> Assignee: Paulo Motta
> Fix For: 3.x
>
>
> forceRepairRangeAsync is deprecated in 2.2/3.x series. It's still available
> for older clients though. Unfortunately it sometimes hangs when you call it.
> It looks like it completes fine but the notification to the client that the
> operation is done is never sent. This is easiest to see by using nodetool
> from 2.1 against a 3.x cluster.
> {noformat}
> [Nicks-MacBook-Pro:16:06:21 cassandra-2.1] cassandra$ ./bin/nodetool repair
> -st 0 -et 1 OpsCenter
> [2016-03-24 16:06:50,165] Nothing to repair for keyspace 'OpsCenter'
> [Nicks-MacBook-Pro:16:06:50 cassandra-2.1] cassandra$
> [Nicks-MacBook-Pro:16:06:55 cassandra-2.1] cassandra$
> [Nicks-MacBook-Pro:16:06:55 cassandra-2.1] cassandra$ ./bin/nodetool repair
> -st 0 -et 1 system_distributed
> ...
> ...
> {noformat}
> (I added the ellipses)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)