dcapwell commented on code in PR #4556:
URL: https://github.com/apache/cassandra/pull/4556#discussion_r2729700930
##########
src/java/org/apache/cassandra/service/StorageProxy.java:
##########
@@ -2023,7 +2026,25 @@ public void runMayThrow()
{
try
{
+ MessageParams.reset();
+
+ // Check thresholds before applying mutation locally (same
as MutationVerbHandler does for remote writes)
+ if (description instanceof Mutation)
+ {
+ WriteThresholds.checkWriteThresholds((Mutation)
description);
+ }
+
runnable.run();
+
+ // Capture params from local write and update warning
context
+ Map<ParamType, Object> params = MessageParams.capture();
+ if (handler instanceof AbstractWriteResponseHandler &&
Review Comment:
i feel weird that we have 2 different if checks checking the same thing but
differently... wondering if we should do
```
boolean track = description instanceof Mutation && handler instanceof
AbstractWriteResponseHandler;
```
It would make it clear that the 2 if blocks are related
--
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]