dcapwell commented on code in PR #4556:
URL: https://github.com/apache/cassandra/pull/4556#discussion_r2729698409
##########
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();
Review Comment:
this allocates a empty map if doesn't exist or empty, but we only *could*
have that if this is a mutation (aka not batch), can we avoid calling this
unless the handler is `AbstractWriteResponseHandler`?
--
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]