You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/10/09 11:26:39 UTC
[GitHub] [pulsar] liangyepianzhou opened a new pull request #12312: Fix lowWaterMark of TopicTransactionBuffer
liangyepianzhou opened a new pull request #12312:
URL: https://github.com/apache/pulsar/pull/12312
### Motivation
Fix a bug written in handleLowWaterMark.
When we find that the TxnID of a Transaction in the ongoings which is less than LowWaterMark , we need to abort the Transaction which we get in ongoings ranther than txnId got in args.
### Modifications
Modify` abortMarker = Markers.newTxnAbortMarker(-1L, firstTxn.getMostSigBits(), firstTxn.getLeastSigBits());`
### Verifying this change
Modify the original test to cover this problem
### Documentation
- [x] no-need-doc
This is just a bug fix
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] gaoran10 commented on a change in pull request #12312: [Transaction]Fix lowWaterMark of TopicTransactionBuffer
Posted by GitBox <gi...@apache.org>.
gaoran10 commented on a change in pull request #12312:
URL: https://github.com/apache/pulsar/pull/12312#discussion_r725652876
##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/broker/transaction/buffer/TransactionLowWaterMarkTest.java
##########
@@ -164,9 +168,11 @@ public void testTransactionBufferLowWaterMark() throws Exception {
field.setAccessible(true);
field.set(txn, TransactionImpl.State.OPEN);
producer.newMessage(txn).value(TEST2.getBytes()).send();
-
- message = consumer.receive(2, TimeUnit.SECONDS);
- assertNull(message);
+ try {
+ txn.commit().get();
Review comment:
If this step should be failed, we need to add a fail check `Assert.fail("The commit operation should be failed.");` after the statement `txn.commit().get();`.
##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/broker/transaction/buffer/TransactionLowWaterMarkTest.java
##########
@@ -164,9 +168,11 @@ public void testTransactionBufferLowWaterMark() throws Exception {
field.setAccessible(true);
field.set(txn, TransactionImpl.State.OPEN);
producer.newMessage(txn).value(TEST2.getBytes()).send();
-
- message = consumer.receive(2, TimeUnit.SECONDS);
- assertNull(message);
+ try {
+ txn.commit().get();
Review comment:
If this step should be failed, we need to add a fail check (such as `Assert.fail("The commit operation should be failed.");`) after the statement `txn.commit().get();`.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] congbobo184 merged pull request #12312: [Transaction]Fix lowWaterMark of TopicTransactionBuffer
Posted by GitBox <gi...@apache.org>.
congbobo184 merged pull request #12312:
URL: https://github.com/apache/pulsar/pull/12312
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] gaoran10 commented on a change in pull request #12312: [Transaction]Fix lowWaterMark of TopicTransactionBuffer
Posted by GitBox <gi...@apache.org>.
gaoran10 commented on a change in pull request #12312:
URL: https://github.com/apache/pulsar/pull/12312#discussion_r725652876
##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/broker/transaction/buffer/TransactionLowWaterMarkTest.java
##########
@@ -164,9 +168,11 @@ public void testTransactionBufferLowWaterMark() throws Exception {
field.setAccessible(true);
field.set(txn, TransactionImpl.State.OPEN);
producer.newMessage(txn).value(TEST2.getBytes()).send();
-
- message = consumer.receive(2, TimeUnit.SECONDS);
- assertNull(message);
+ try {
+ txn.commit().get();
Review comment:
If this step should be failed, we need to add a fail check `Assert.fail();` after the statement `txn.commit().get();`.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] liangyepianzhou commented on pull request #12312: [Transaction]Fix lowWaterMark of TopicTransactionBuffer
Posted by GitBox <gi...@apache.org>.
liangyepianzhou commented on pull request #12312:
URL: https://github.com/apache/pulsar/pull/12312#issuecomment-939429644
/pulsarbot run-failure-checks
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org