You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/07/22 18:17:42 UTC

[GitHub] [kafka] dhruvilshah3 commented on a change in pull request #9054: KAFKA-10282: Remove Log metrics immediately when deleting log

dhruvilshah3 commented on a change in pull request #9054:
URL: https://github.com/apache/kafka/pull/9054#discussion_r458991075



##########
File path: core/src/main/scala/kafka/log/LogManager.scala
##########
@@ -978,6 +978,7 @@ class LogManager(logDirs: Seq[File],
         checkpointRecoveryOffsetsAndCleanSnapshotsInDir(logDir, logsToCheckpoint, ArrayBuffer.empty)
         checkpointLogStartOffsetsInDir(logDir, logsToCheckpoint)
       }
+      removedLog.removeLogMetrics()

Review comment:
       We use the same pattern of removing the log from `futureLogs` or `currentLogs` and then removing the corresponding log metrics in `handleLogDirFailure`. Do you think it'd be useful to turn this into a helper method and reuse the logic in both places?




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

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