kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: MINOR: Add some logging for the transaction coordinator
Date Tue, 20 Jun 2017 18:32:10 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.11.0 a3633865a -> 6414b628a


MINOR: Add some logging for the transaction coordinator

Author: Apurva Mehta <apurva@confluent.io>

Reviewers: Guozhang Wang <wangguoz@gmail.com>, Jason Gustafson <jason@confluent.io>

Closes #3278 from apurvam/MINOR-add-logging-to-transaction-coordinator-in-all-failure-cases

(cherry picked from commit cb2fdbd6c1621fd578c4c1422ead62faf7ae3f7f)
Signed-off-by: Guozhang Wang <wangguoz@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/6414b628
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/6414b628
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/6414b628

Branch: refs/heads/0.11.0
Commit: 6414b628af326e8275c0caf1e91225f01daae14f
Parents: a363386
Author: Apurva Mehta <apurva@confluent.io>
Authored: Tue Jun 20 11:31:59 2017 -0700
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Tue Jun 20 11:32:07 2017 -0700

----------------------------------------------------------------------
 .../kafka/coordinator/transaction/TransactionCoordinator.scala    | 3 +--
 .../transaction/TransactionMarkerRequestCompletionHandler.scala   | 2 +-
 .../kafka/coordinator/transaction/TransactionStateManager.scala   | 1 -
 3 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/6414b628/core/src/main/scala/kafka/coordinator/transaction/TransactionCoordinator.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/coordinator/transaction/TransactionCoordinator.scala
b/core/src/main/scala/kafka/coordinator/transaction/TransactionCoordinator.scala
index 51424f8..54e6923 100644
--- a/core/src/main/scala/kafka/coordinator/transaction/TransactionCoordinator.scala
+++ b/core/src/main/scala/kafka/coordinator/transaction/TransactionCoordinator.scala
@@ -400,7 +400,6 @@ class TransactionCoordinator(brokerId: Int,
               preSendResult match {
                 case Left(err) =>
                   info(s"Aborting sending of transaction markers after appended $txnMarkerResult
to transaction log and returning $err error to client for $transactionalId's EndTransaction
request")
-
                   responseCallback(err)
 
                 case Right((txnMetadata, newPreSendMetadata)) =>
@@ -435,7 +434,7 @@ class TransactionCoordinator(brokerId: Int,
         TransactionResult.ABORT,
         (error: Errors) => error match {
           case Errors.NONE =>
-            debug(s"Completed rollback ongoing transaction of transactionalId: ${txnIdAndPidEpoch.transactionalId}
due to timeout")
+            info(s"Completed rollback ongoing transaction of transactionalId: ${txnIdAndPidEpoch.transactionalId}
due to timeout")
           case Errors.INVALID_PRODUCER_ID_MAPPING |
                Errors.INVALID_PRODUCER_EPOCH |
                Errors.CONCURRENT_TRANSACTIONS =>

http://git-wip-us.apache.org/repos/asf/kafka/blob/6414b628/core/src/main/scala/kafka/coordinator/transaction/TransactionMarkerRequestCompletionHandler.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/coordinator/transaction/TransactionMarkerRequestCompletionHandler.scala
b/core/src/main/scala/kafka/coordinator/transaction/TransactionMarkerRequestCompletionHandler.scala
index 4abaada..54960b9 100644
--- a/core/src/main/scala/kafka/coordinator/transaction/TransactionMarkerRequestCompletionHandler.scala
+++ b/core/src/main/scala/kafka/coordinator/transaction/TransactionMarkerRequestCompletionHandler.scala
@@ -182,7 +182,7 @@ class TransactionMarkerRequestCompletionHandler(brokerId: Int,
 
             if (!abortSending) {
               if (retryPartitions.nonEmpty) {
-                trace(s"Re-enqueuing ${txnMarker.transactionResult} transaction markers for
transactional id $transactionalId " +
+                debug(s"Re-enqueuing ${txnMarker.transactionResult} transaction markers for
transactional id $transactionalId " +
                   s"under coordinator epoch ${txnMarker.coordinatorEpoch}")
 
                 // re-enqueue with possible new leaders of the partitions

http://git-wip-us.apache.org/repos/asf/kafka/blob/6414b628/core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala
b/core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala
index c0e4a77..e0d5076 100644
--- a/core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala
+++ b/core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala
@@ -506,7 +506,6 @@ class TransactionStateManager(brokerId: Int,
             info(s"Accessing the cached transaction metadata for $transactionalId returns
$err error; " +
               s"aborting transition to the new metadata and setting the error in the callback")
             responseError = err
-
           case Right(Some(epochAndMetadata)) =>
             val metadata = epochAndMetadata.transactionMetadata
 


Mime
View raw message