Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Transaction] add method to clear up transaction buffer snapshot #11934

Merged
merged 3 commits into from
Sep 7, 2021

Conversation

gaoran10
Copy link
Contributor

@gaoran10 gaoran10 commented Sep 6, 2021

Motivation

Currently, the transaction buffer didn't support clear up the snapshot, if delete the topic the snapshot will not be deleted.

refer to #11928

Modifications

Clear up the transaction buffer snapshot when deleting the topic.

Verifying this change

Add a test to verify the snapshot was clear up or not.

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API: (no)
  • The schema: (no)
  • The default values of configurations: (no)
  • The wire protocol: (no)
  • The rest endpoints: (no)
  • The admin cli options: (no)
  • Anything that affects deployment: (no)

Documentation

Check the box below and label this PR (if you have committer privilege).

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

Copy link
Contributor

@congbobo184 congbobo184 left a comment

Choose a reason for hiding this comment

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

LGTM!

txn.commit().get();

// wait for take snapshot
Thread.sleep(1000 * 3);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we trigger the snapshot manually? this might introduce a flaky test in the CI enviroment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I'll fix this.

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

+1

@Anonymitaet Anonymitaet added the doc-not-needed Your PR changes do not impact docs label Sep 7, 2021
@codelipenghui codelipenghui added this to the 2.9.0 milestone Sep 7, 2021
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

LGTM

@codelipenghui why you added 2.8.2 label ?
This looks like a new (internal) feature.
We should not port commits to a "stable" branch if not strictly needed. Otherwise we risk to compromise stability.

@eolivelli eolivelli merged commit d86db3f into apache:master Sep 7, 2021
codelipenghui pushed a commit that referenced this pull request Sep 9, 2021
@codelipenghui codelipenghui added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Sep 9, 2021
@gaoran10 gaoran10 deleted the gaoran/delete-txn-snapshot branch September 9, 2021 15:44
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/transaction cherry-picked/branch-2.8 Archived: 2.8 is end of life doc-not-needed Your PR changes do not impact docs release/2.8.2 release/2.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants