Github user aweisberg commented on a diff in the pull request:
https://github.com/apache/cassandra/pull/184#discussion_r163085375
--- Diff: src/java/org/apache/cassandra/net/MessageDeliveryTask.java ---
@@ -96,19 +98,11 @@ private void handleFailure(Throwable t)
if (message.doCallbackOnFailure())
{
MessageOut response = new
MessageOut(MessagingService.Verb.INTERNAL_RESPONSE)
-
.withParameter(MessagingService.FAILURE_RESPONSE_PARAM,
MessagingService.ONE_BYTE);
+
.withParameter(ParameterType.FAILURE_RESPONSE, MessagingService.ONE_BYTE);
if (t instanceof TombstoneOverwhelmingException)
{
- try (DataOutputBuffer out = new DataOutputBuffer())
- {
-
out.writeShort(RequestFailureReason.READ_TOO_MANY_TOMBSTONES.code);
- response =
response.withParameter(MessagingService.FAILURE_REASON_PARAM, out.getData());
- }
- catch (IOException ex)
- {
- throw new RuntimeException(ex);
- }
+ response =
response.withParameter(ParameterType.FAILURE_REASON.FAILURE_REASON,
Shorts.checkedCast(RequestFailureReason.READ_TOO_MANY_TOMBSTONES.code));
--- End diff --
It's just a bug in the code that happens to compile and work (with a
warning). I'll remove the extra one.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]