This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 137
[fix][transaction] Handle some failures in transaction #1977
Merged
gaoran10
merged 5 commits into
streamnative:master
from
gaoran10:handle_some_failures_in_transaction
Aug 7, 2023
Merged
[fix][transaction] Handle some failures in transaction #1977
gaoran10
merged 5 commits into
streamnative:master
from
gaoran10:handle_some_failures_in_transaction
Aug 7, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #1977 +/- ##
============================================
- Coverage 17.72% 17.06% -0.67%
+ Complexity 752 728 -24
============================================
Files 195 191 -4
Lines 14174 14232 +58
Branches 1325 1332 +7
============================================
- Hits 2512 2428 -84
- Misses 11480 11628 +148
+ Partials 182 176 -6
|
kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/storage/ProducerStateManager.java
Show resolved
Hide resolved
…lManager (streamnative#69) (cherry picked from commit 1ec5d32)
(cherry picked from commit aff5f93)
(cherry picked from commit 6d5695b)
(cherry picked from commit 1797d8e)
gaoran10
force-pushed
the
handle_some_failures_in_transaction
branch
from
July 30, 2023 09:23
4ddb5fa
to
ff9cfdf
Compare
Demogorgon314
suggested changes
Aug 3, 2023
// do not cache failed futures | ||
handlerFuture.exceptionally(error -> { | ||
log.error("getChannel failed {} {}", socketAddress, error.getMessage(), error); | ||
handlerMap.remove(socketAddress, handlerFuture); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the value in the map may cause Recursive update
error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is an example:
ConcurrentHashMap<String, String> map = new ConcurrentHashMap<>();
map.computeIfAbsent("test", key -> {
map.remove("test");
return "test";
});
Demogorgon314
approved these changes
Aug 7, 2023
Demogorgon314
pushed a commit
to Demogorgon314/kop
that referenced
this pull request
Oct 30, 2023
…1977) ### Modifications Handle some failures while writing transaction logs and markers. --------- Co-authored-by: Enrico Olivelli <[email protected]> (cherry picked from commit 0c9f946)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Modifications
Handle some failures while writing transaction logs and markers.
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)