Github user jasobrown commented on a diff in the pull request:
https://github.com/apache/cassandra/pull/184#discussion_r160535682
--- 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 --
should `ParameterType.FAILURE_REASON.FAILURE_REASON` be
`ParameterType.FAILURE_REASON`? This looks weird with two "`FAILURE_REASON`"s,
unless there's some java syntax nugget I'm unfamiliar with.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]