AndrewJSchofield commented on code in PR #19045:
URL: https://github.com/apache/kafka/pull/19045#discussion_r1975119796


##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -1326,6 +1355,56 @@ int leaderEpoch() {
         return leaderEpoch;
     }
 
+    /**
+     * Records the fetch lock ratio metric. The metric is the ratio of the 
time the fetch lock was
+     * acquired to the total time since the last lock acquisition. The total 
time is calculated by
+     * adding the time since the last lock acquisition to the time the fetch 
lock was acquired.
+     *
+     * @param acquiredTime The time duration the fetch lock was acquired.
+     */
+    // Visible for testing
+    void recordFetchLockRatioMetric(long acquiredTime) {

Review Comment:
   I think there's still some confused naming here. Some of these "times" are 
the current time, and some are durations. Please make the naming consistent so 
it's easier to follow.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to