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

Natnael Adere commented on CASSANDRA-17199:
-------------------------------------------

[~bcicchi] I have made some updates to the logging of failed session in a 
stream. Currently, I'm cleaning up some test and looking for reviewers. An 
example of the a current log output is this:

WARN  [node2_Stream-Deserializer-/127.0.0.1:7012-969cebce] node2 2023-01-13 
14:06:29,920 StreamResultFuture.java:248 - [Stream 
#62ebf140-9375-11ed-80a3-1fe3dc3967e8] Stream failed: 
Session peer /127.0.0.1:7012 Failed because there was an 
java.nio.channels.ClosedChannelException with state=STREAMING

Any feedback?

> Provide summary of failed SessionInfo's in StreamResultFuture
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-17199
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17199
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Observability/Logging
>            Reporter: Brendan Cicchi
>            Assignee: Natnael Adere
>            Priority: Normal
>              Labels: AdventCalendar2021, lhf
>             Fix For: 4.0.x
>
>
> Currently, we warn about the presence of one or more failed sessions existing 
> in the final state and then an operator/user traces back through the logs to 
> find any failed streams for troubleshooting.
> {code:java}
> private synchronized void maybeComplete()
> {
>     if (finishedAllSessions())
>     {
>         StreamState finalState = getCurrentState();
>         if (finalState.hasFailedSession())
>         {
>             logger.warn("[Stream #{}] Stream failed", planId);
>             tryFailure(new StreamException(finalState, "Stream failed"));
>         }
>         else
>         {
>             logger.info("[Stream #{}] All sessions completed", planId);
>             trySuccess(finalState);
>         }
>     }
> } {code}
> It would be helpful to log out a summary of the SessionInfo for each failed 
> session since that should be accessible via the StreamState.
>  
> This can be especially helpful for longer streaming operations like bootstrap 
> where the failure could have been a long time back and all recent streams 
> leading up to the warning actually are successful.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to