mattwong949 commented on a change in pull request #10914:
URL: https://github.com/apache/kafka/pull/10914#discussion_r705721022
##########
File path: core/src/main/scala/kafka/log/LogCleanerManager.scala
##########
@@ -163,17 +168,18 @@ private[log] class LogCleanerManager(val logDirs:
Seq[File],
* Choose the log to clean next and add it to the in-progress set. We
recompute this
* each time from the full set of logs to allow logs to be dynamically
added to the pool of logs
* the log manager maintains.
+ * Returns a tuple of an Option of the log selected to be cleaned and the
reason it was selected.
*/
- def grabFilthiestCompactedLog(time: Time, preCleanStats: PreCleanStats = new
PreCleanStats()): Option[LogToClean] = {
+ def grabFilthiestCompactedLog(time: Time, preCleanStats: PreCleanStats = new
PreCleanStats()): (Option[LogToClean], LogCleaningReason) = {
Review comment:
I've moved this into the LogToClean class as a var. We now set this var
in `grabFilthiestCompactedLog` and I've expanded on some of the current testing
in `LogCleanerManagerTest` to check that the reason is correct when using
`grabFilthiestCompactedLog`
--
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]