zecookiez commented on code in PR #49816: URL: https://github.com/apache/spark/pull/49816#discussion_r1951533664
########## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/statefulOperators.scala: ########## @@ -373,8 +389,21 @@ trait StateStoreWriter val storeMetrics = store.metrics longMetric("numTotalStateRows") += storeMetrics.numKeys longMetric("stateMemory") += storeMetrics.memoryUsedBytes - storeMetrics.customMetrics.foreach { case (metric, value) => - longMetric(metric.name) += value + storeMetrics.customMetrics.foreach { + // Set the max for instance metrics + case (metric: StateStoreInstanceMetric, value) => Review Comment: Good idea, I've moved this logic to `setStoreCustomMetrics` -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org