netudima commented on PR #4707:
URL: https://github.com/apache/cassandra/pull/4707#issuecomment-4189476185

    actually table name/ID could be tricky here because you will have to 
implement a cleanup (or forget logic) to not leak memory in case of a table 
drop.
   I see the following ways:
   1. the simplest option is to have an upper limit here for the value - 
min(limit, metricValue) to reduce impact if the metric value is too high. If 
the configurable limit value is negative we can disable the metric usage and 
apply the old behaviuor just in case.
   2. slightly different way is to apply a limit to the input, not output, of 
the metric - estimatedResponseBytes.update(min(limit, currentResponseSize)) - 
to reduce impact of too huge requests to an avg calculation.
   3. use a median, not avg to avoid impact from size pikes by introducing a 
histogram here but histogram values retrieval is more expensive and we will 
have to cache them as we do for speculative retry threshold value.
   


-- 
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]

Reply via email to