chia7712 commented on a change in pull request #8657:
URL: https://github.com/apache/kafka/pull/8657#discussion_r431210497



##########
File path: core/src/main/scala/kafka/server/ReplicaManager.scala
##########
@@ -65,13 +65,24 @@ import scala.compat.java8.OptionConverters._
 /*
  * Result metadata of a log append operation on the log
  */
-case class LogAppendResult(info: LogAppendInfo, exception: Option[Throwable] = 
None) {
+case class LogAppendResult(info: LogAppendInfo,
+                           exception: Option[Throwable] = None,
+                           leaderHWChange: LeaderHWChange = 
LeaderHWChange.None) {
   def error: Errors = exception match {
     case None => Errors.NONE
     case Some(e) => Errors.forException(e)
   }
 }
 
+/**
+ * a flag indicting whether the HWM has been changed.
+ */
+sealed trait LeaderHWChange

Review comment:
       this enum type is more readable than ```boolean```




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to