Skip to content

Conversation

@liangyepianzhou
Copy link
Contributor

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

  • no-need-doc
    This is just a bug fix

@liangyepianzhou liangyepianzhou changed the title Fix lowWaterMark of TopicTransactionBuffer [Transaction]Fix lowWaterMark of TopicTransactionBuffer Oct 9, 2021
@liangyepianzhou
Copy link
Contributor Author

/pulsarbot run-failure-checks

message = consumer.receive(2, TimeUnit.SECONDS);
assertNull(message);
try {
txn.commit().get();
Copy link
Contributor

@gaoran10 gaoran10 Oct 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();.

@congbobo184 congbobo184 merged commit ba7469b into apache:master Oct 12, 2021
zeo1995 pushed a commit to zeo1995/pulsar that referenced this pull request Oct 14, 2021
* up/master: (26 commits)
  [pulsar-admin] Allow setting --forward-source-message-property to false when updating a pulsar function (apache#12128)
  [website][upgrade]feat: docs migration - Development (apache#12320)
  Update delete inactive topic configuration documentation (apache#12350)
  [PIP 95][Issue 12040][broker] Multiple bind addresses for Pulsar protocol (apache#12056)
  Added Debezium Source for MS SQL Server (apache#12256)
  Fix: flaky oracle tests (apache#12306)
  [C++] Use URL encoded content type for OAuth 2.0 authentication (apache#12341)
  [C++] Handle OAuth 2.0 exceptional cases gracefully (apache#12335)
  feat(cli): add restart command to pulsar-daemon (apache#12279)
  [client-tools] Remove redundant initial value (apache#12296)
  Make AuthenticationTokenTest to run on windows (apache#12329)
  [offload] fix FileSystemManagedLedgerOffloader can not cleanup outdated ledger data (apache#12309)
  [Doc]--Update contents for Pulsar adaptor for Apache Spark (apache#12338)
  [PIP 95][Issue 12040][broker] Improved multi-listener in standalone mode (apache#12066)
  [website][upgrade]feat: docs migration - Cookbooks (apache#12319)
  [testclient] Make --payload-file take effect in PerformanceClient (apache#12187)
  [website][upgrade]feat: docs migration - adaptor (apache#12318)
  [pulsar-client] Add partition-change api for producer/consumer interceptors (apache#12287)
  [Transaction]Fix lowWaterMark of TopicTransactionBuffer (apache#12312)
  [pulsar-admin] New option takes precedence over deprecated option (apache#12260)
  ...

# Conflicts:
#	site2/website-next/docusaurus.config.js
#	site2/website-next/versions.json
@congbobo184 congbobo184 added this to the 2.10.0 milestone Dec 17, 2021
@codelipenghui codelipenghui modified the milestones: 2.10.0, 2.11.0, 2.9.0 Dec 20, 2021
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
### 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants