maedhroz commented on a change in pull request #1180:
URL: https://github.com/apache/cassandra/pull/1180#discussion_r701450690
##########
File path: src/java/org/apache/cassandra/service/reads/ReadCallback.java
##########
@@ -215,13 +300,33 @@ public void onResponse(Message<ReadResponse> message)
Map<ParamType, Object> params = message.header.params();
if (params.containsKey(ParamType.TOMBSTONE_ABORT))
{
- getWarningCounter().addTombstoneAbort(message.from(), (Integer)
params.get(ParamType.TOMBSTONE_ABORT));
+ getWarningCounter().tombstones.addAbort(message.from(), (Integer)
params.get(ParamType.TOMBSTONE_ABORT));
onFailure(message.from(),
RequestFailureReason.READ_TOO_MANY_TOMBSTONES);
return;
}
else if (params.containsKey(ParamType.TOMBSTONE_WARNING))
{
- getWarningCounter().addTombstoneWarning(message.from(), (Integer)
params.get(ParamType.TOMBSTONE_WARNING));
+ getWarningCounter().tombstones.addWarning(message.from(),
(Integer) params.get(ParamType.TOMBSTONE_WARNING));
+ }
+ if (params.containsKey(ParamType.LOCAL_READ_TOO_LARGE_ABORT))
+ {
+ getWarningCounter().localReadSizeTooLarge.addAbort(message.from(),
(Long) params.get(ParamType.LOCAL_READ_TOO_LARGE_ABORT));
+ onFailure(message.from(), RequestFailureReason.READ_TOO_LARGE);
+ return;
+ }
+ else if (params.containsKey(ParamType.LOCAL_READ_TOO_LARGE_WARNING))
+ {
+
getWarningCounter().localReadSizeTooLarge.addWarning(message.from(), (Long)
params.get(ParamType.LOCAL_READ_TOO_LARGE_WARNING));
+ }
+ if (params.containsKey(ParamType.ROW_INDEX_ENTRY_TOO_LARGE_ABORT))
+ {
+ getWarningCounter().rowIndexTooLarge.addAbort(message.from(),
(Long) params.get(ParamType.ROW_INDEX_ENTRY_TOO_LARGE_ABORT));
+ onFailure(message.from(), RequestFailureReason.READ_TOO_LARGE);
+ return;
+ }
+ else if
(params.containsKey(ParamType.ROW_INDEX_ENTRY_TOO_LARGE_WARNING))
+ {
+ getWarningCounter().rowIndexTooLarge.addWarning(message.from(),
(Long) params.get(ParamType.ROW_INDEX_ENTRY_TOO_LARGE_WARNING));
Review comment:
Maybe we can broaden what's happening in `WarningCounter` (which I'd
maybe rename `WarningContext` or something to avoid the clash w/
`WarnAbortCounter`) to include processing these. (ex. Have a method that
processes the params and returns an appropriate param?)
--
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]