kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jjko...@apache.org
Subject git commit: KAFKA-1522; Follow-up patch (added some documentation comments); reviewed by Joel Koshy
Date Fri, 15 Aug 2014 19:00:33 GMT
Repository: kafka
Updated Branches:
  refs/heads/transactional_messaging 45c4de00d -> f550970b0


KAFKA-1522; Follow-up patch (added some documentation comments); reviewed by Joel Koshy


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

Branch: refs/heads/transactional_messaging
Commit: f550970b0a2fd008efb0b0cf0c9e74a2a3778ece
Parents: 45c4de0
Author: Dong Lin <lindong28@gmail.com>
Authored: Fri Aug 15 12:00:18 2014 -0700
Committer: Joel Koshy <jjkoshy@gmail.com>
Committed: Fri Aug 15 12:00:18 2014 -0700

----------------------------------------------------------------------
 .../scala/kafka/api/TransactionRequest.scala    | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/f550970b/core/src/main/scala/kafka/api/TransactionRequest.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/api/TransactionRequest.scala b/core/src/main/scala/kafka/api/TransactionRequest.scala
index 29df42c..9a8d82d 100644
--- a/core/src/main/scala/kafka/api/TransactionRequest.scala
+++ b/core/src/main/scala/kafka/api/TransactionRequest.scala
@@ -43,15 +43,19 @@ object TransactionRequest {
   }
 }
 
+
+
+
 object TxRequestTypes {
-  val Ongoing: Short = 0
-  val Begin: Short = 1
-  val PreCommit: Short = 2
-  val Commit: Short = 3
-  val Committed: Short = 4
-  val PreAbort: Short = 5
-  val Abort: Short = 6
-  val Aborted: Short = 7
+  // The following flags are set in the message header of both data records and transaction
control records as described below
+  val Ongoing: Short = 0   // Sent from Producer to data brokers (i.e., set in the header
of the actual data records)
+  val Begin: Short = 1     // Sent from Producer to Transaction Manager, appended to transactionTopic.
+  val PreCommit: Short = 2 // Sent from Producer to Transaction Manager, appended to transactionTopic.
+  val Commit: Short = 3    // Sent from Transaction Manager to Brokers, appended to topic
partitions. (Also read by consumer.)
+  val Committed: Short = 4 // Appended to transaction control topic after Transaction Manager
receives a successful response from "Commit" requests.
+  val PreAbort: Short = 5  // Similar to "PreCommit".
+  val Abort: Short = 6     // Similar to "Commit".
+  val Aborted: Short = 7   // Similar to "Committed".
 }
 
 


Mime
View raw message