cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulo Motta (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-13356) BootstrapMonitor.progress does not store all error messages
Date Thu, 30 Mar 2017 16:12:41 GMT

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

Paulo Motta commented on CASSANDRA-13356:
-----------------------------------------

Thanks for the patch. I'm afraid this will not work yet because it will throw the exception
to the JMX notifier and not to the client which will still hang. You need to do something
similar to the {{RepairRunner}} which will store the exception and signal completion to the
client, which will then display the exception.

Can you test this manually before submitting a new patch? You can use [ccm|https://github.com/pcmanus/ccm]
to bring up a cluster and you may induct a streaming/bootstrap failure with the following
code:
{noformat}
diff --git a/src/java/org/apache/cassandra/streaming/StreamSession.java b/src/java/org/apache/cassandra/streaming/StreamSession.java
index d57fae8..4a91af3 100644
--- a/src/java/org/apache/cassandra/streaming/StreamSession.java
+++ b/src/java/org/apache/cassandra/streaming/StreamSession.java
@@ -731,6 +731,10 @@ public class StreamSession implements IEndpointStateChangeSubscriber
 
     private void startStreamingFiles()
     {
+        if (true)
+        {
+            throw new RuntimeException("hoho");
+        }
         streamResult.handleSessionPrepared(this);
 
         state(State.STREAMING);
{noformat}

If you're feeling adventurous you may try to add a new [cassandra-dtest|https://github.com/riptano/cassandra-dtest/]
based on {{bootstrap_test.py:resumable_bootstrap_test}}.

> BootstrapMonitor.progress does not store all error messages
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-13356
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13356
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Hao Zhong
>            Assignee: Hao Zhong
>              Labels: lhf
>             Fix For: 4.x
>
>         Attachments: cassandra.patch
>
>
> The BootstrapMonitor.progress ignores error messages when an error is ProgressEventType.ERROR.
Indeed, RepairRunner.progress once had a similar bug, but is fixed. The fixed code is:
> {code}
>  public void progress(String tag, ProgressEvent event)
>     {
>         ProgressEventType type = event.getType();
>         String message = String.format("[%s] %s", format.format(System.currentTimeMillis()),
event.getMessage());
>         if (type == ProgressEventType.PROGRESS)
>         {
>             message = message + " (progress: " + (int)event.getProgressPercentage() +
"%)";
>         }
>         out.println(message);
>         if (type == ProgressEventType.ERROR)
>         {
>             error = new RuntimeException("Repair job has failed with the error message:
" + message);
>         }
>         if (type == ProgressEventType.COMPLETE)
>         {
>             condition.signalAll();
>         }
>     }
> {code}
> Please refer to CASSANDRA-12508 for details.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message