codelipenghui commented on a change in pull request #5570: Transaction log
implemention
URL: https://github.com/apache/pulsar/pull/5570#discussion_r346145938
##########
File path: pulsar-common/src/main/proto/PulsarApi.proto
##########
@@ -645,6 +645,35 @@ enum TxnAction {
ABORT = 1;
}
+enum TxnStatus {
+ OPEN = 0;
+ COMMITTING = 1;
+ COMMITTED = 2;
+ ABORTING = 3;
+ ABORTED = 4;
+}
+
+message TransactionMetadataEntry {
+
+ enum TransactionMetadataOp {
+ NEW = 0;
+ ADD_PARTITION = 1;
+ ADD_SUBSCRIPTION = 2;
+ UPDATE = 3;
+ }
+
+ optional TransactionMetadataOp metadata_op = 1;
+ optional uint64 txnid_least_bits = 2 [default = 0];
+ optional uint64 txnid_most_bits = 3 [default = 0];
+ optional TxnStatus expected_status = 4;
+ optional TxnStatus new_status = 5;
+ repeated string partitions = 6;
+ repeated Subscription subscriptions = 7;
+ optional uint64 timeout_ms = 8;
+ optional uint64 start_time = 9;
+ optional uint64 last_modification_time = 10;
+}
+
Review comment:
I think `PulsarApi.proto` only for wire protocol, is it better to move
TransactionMetadataEntry to a split proto file? @sijie please help confirm.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services