kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [kafka] branch trunk updated: MINOR: Fix log message error of loadTransactionMetadata (#6571)
Date Thu, 25 Apr 2019 16:13:49 GMT
This is an automated email from the ASF dual-hosted git repository.

jgus pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 26a001d  MINOR: Fix log message error of loadTransactionMetadata (#6571)
26a001d is described below

commit 26a001d13394986ab2cfbd3cec2aebe000105dad
Author: Shaobo Liu <lambda.tencent@gmail.com>
AuthorDate: Fri Apr 26 00:13:34 2019 +0800

    MINOR: Fix log message error of loadTransactionMetadata (#6571)
    
    Reviewers: Jason Gustafson <jason@confluent.io>
---
 .../main/scala/kafka/coordinator/group/GroupMetadataManager.scala   | 2 +-
 .../kafka/coordinator/transaction/TransactionStateManager.scala     | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/core/src/main/scala/kafka/coordinator/group/GroupMetadataManager.scala b/core/src/main/scala/kafka/coordinator/group/GroupMetadataManager.scala
index 7b24498..eecf713 100644
--- a/core/src/main/scala/kafka/coordinator/group/GroupMetadataManager.scala
+++ b/core/src/main/scala/kafka/coordinator/group/GroupMetadataManager.scala
@@ -522,7 +522,7 @@ class GroupMetadataManager(brokerId: Int,
         // buffer may not be needed if records are read from memory
         var buffer = ByteBuffer.allocate(0)
 
-        // loop breaks if leader changes at any time during the load, since getHighWatermark
is -1
+        // loop breaks if leader changes at any time during the load, since logEndOffset
is -1
         val loadedOffsets = mutable.Map[GroupTopicPartition, CommitRecordMetadataAndOffset]()
         val pendingOffsets = mutable.Map[Long, mutable.Map[GroupTopicPartition, CommitRecordMetadataAndOffset]]()
         val loadedGroups = mutable.Map[String, GroupMetadata]()
diff --git a/core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala
b/core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala
index b45953f..92cba50 100644
--- a/core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala
+++ b/core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala
@@ -287,13 +287,13 @@ class TransactionStateManager(brokerId: Int,
 
     replicaManager.getLog(topicPartition) match {
       case None =>
-        warn(s"Attempted to load offsets and group metadata from $topicPartition, but found
no log")
+        warn(s"Attempted to load transaction metadata from $topicPartition, but found no
log")
 
       case Some(log) =>
         // buffer may not be needed if records are read from memory
         var buffer = ByteBuffer.allocate(0)
 
-        // loop breaks if leader changes at any time during the load, since getHighWatermark
is -1
+        // loop breaks if leader changes at any time during the load, since logEndOffset
is -1
         var currOffset = log.logStartOffset
 
         try {
@@ -312,7 +312,7 @@ class TransactionStateManager(brokerId: Int,
                 // minOneMessage = true in the above log.read means that the buffer may need
to be grown to ensure progress can be made
                 if (buffer.capacity < bytesNeeded) {
                   if (config.transactionLogLoadBufferSize < bytesNeeded)
-                    warn(s"Loaded offsets and group metadata from $topicPartition with buffer
larger ($bytesNeeded bytes) than " +
+                    warn(s"Loaded transaction metadata from $topicPartition with buffer larger
($bytesNeeded bytes) than " +
                       s"configured transaction.state.log.load.buffer.size (${config.transactionLogLoadBufferSize}
bytes)")
 
                   buffer = ByteBuffer.allocate(bytesNeeded)


Mime
View raw message