maedhroz commented on code in PR #3274:
URL: https://github.com/apache/cassandra/pull/3274#discussion_r1589743632
##########
src/java/org/apache/cassandra/transport/Dispatcher.java:
##########
@@ -99,8 +100,23 @@ public Dispatcher(boolean useLegacyFlusher)
this.useLegacyFlusher = useLegacyFlusher;
}
+ @Override
public void dispatch(Channel channel, Message.Request request,
FlushItemConverter forFlusher, Overload backpressure)
{
+ if (!request.connection().getTracker().isRunning())
+ {
+ // We can not respond with a custom, transport, or server
exceptions since, given current implementation of clients,
+ // they will defunct the connection. Without a protocol version
bump that introduces an "I am going away message",
+ // we have to stick to an existing error code.
+ Message.Response response = ErrorMessage.fromException(new
OverloadedException("Server is shutting down"));
+ response.setStreamId(request.getStreamId());
+ response.setWarnings(ClientWarn.instance.getWarnings());
+ response.attach(request.connection);
+ FlushItem<?> toFlush = forFlusher.toFlushItem(channel, request,
response);
+ flush(toFlush);
+ return;
+ }
Review Comment:
Trying to find a test that hits this block/codepath...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]