Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

[transaction] Recover from temporary errors on PulsarTopicProducerStateManagerSnapshotBuffer #1946

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

gaoran10
Copy link
Contributor

@gaoran10 gaoran10 commented Jul 7, 2023

(cherry picked from commit 3a61fdb)

Motivation

Recover from temporary errors on PulsarTopicProducerStateManagerSnapshotBuffer.

Modifications

Discard invalid readers and producers for producer state manager snapshot topics.

Documentation

Check the box below.

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)

@github-actions github-actions bot added the no-need-doc This pr does not need any document label Jul 7, 2023
@codecov
Copy link

codecov bot commented Jul 10, 2023

Codecov Report

Merging #1946 (5183d18) into master (04cad20) will decrease coverage by 0.14%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1946      +/-   ##
============================================
- Coverage     17.83%   17.69%   -0.14%     
  Complexity      752      752              
============================================
  Files           195      195              
  Lines         14081    14193     +112     
  Branches       1311     1327      +16     
============================================
+ Hits           2511     2512       +1     
- Misses        11388    11499     +111     
  Partials        182      182              
Impacted Files Coverage Δ
...PulsarTopicProducerStateManagerSnapshotBuffer.java 0.00% <0.00%> (ø)

... and 9 files with indirect coverage changes

@gaoran10
Copy link
Contributor Author

spotbugs-check problem spotbugs/spotbugs#1001

.topic(topic)
.startMessageId(MessageId.earliest)
.readCompacted(true)
.createAsync();
reader = newReader;

newReader.whenComplete((r, error) -> {
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a unit test for this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for not getting back to you sooner. I found this change may cause NPE problems, I add NPE checks and unit tests, maybe we don't need to merge this PR immediately.

@gaoran10 gaoran10 changed the title [transaction] Recover from temporary errors on PulsarTopicProducerStateManagerSnapshotBuffer [WIP] [transaction] Recover from temporary errors on PulsarTopicProducerStateManagerSnapshotBuffer Jul 26, 2023
@gaoran10 gaoran10 changed the title [WIP] [transaction] Recover from temporary errors on PulsarTopicProducerStateManagerSnapshotBuffer [transaction] Recover from temporary errors on PulsarTopicProducerStateManagerSnapshotBuffer Jul 30, 2023
@gaoran10 gaoran10 marked this pull request as draft July 30, 2023 04:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants