Pipe: Fixed the event clear logic of drop pipe#17560
Open
Pipe: Fixed the event clear logic of drop pipe#17560
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #17560 +/- ##
============================================
+ Coverage 39.85% 40.12% +0.26%
Complexity 2547 2547
============================================
Files 5171 5174 +3
Lines 348174 348449 +275
Branches 44489 44549 +60
============================================
+ Hits 138767 139811 +1044
+ Misses 209407 208638 -769 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
jt2594838
reviewed
Apr 29, 2026
Comment on lines
+131
to
+132
| private final Set<Triple<String, Long, Integer>> droppedPipeTaskKeys = | ||
| ConcurrentHashMap.newKeySet(); |
Contributor
There was a problem hiding this comment.
Add a comment to explain what the three are.
Comment on lines
369
to
+373
| synchronized (queue) { | ||
| queue.put(new EventWaitingForTransfer(eventIdGenerator.incrementAndGet(), connector, event)); | ||
| } | ||
|
|
||
| queue.put(new EventWaitingForTransfer(eventIdGenerator.incrementAndGet(), connector, event)); |
Comment on lines
+184
to
+201
| protected static boolean isEventFromPipe( | ||
| final EnrichedEvent event, | ||
| final String pipeNameToDrop, | ||
| final long creationTimeToDrop, | ||
| final int regionId) { | ||
| return pipeNameToDrop.equals(event.getPipeName()) | ||
| && creationTimeToDrop == event.getCreationTime() | ||
| && regionId == event.getRegionId(); | ||
| } | ||
|
|
||
| protected boolean isEventFromDroppedPipe(final E event) { | ||
| return event instanceof EnrichedEvent | ||
| && ((EnrichedEvent) event).getPipeName() != null | ||
| && isPipeDropped( | ||
| ((EnrichedEvent) event).getPipeName(), | ||
| ((EnrichedEvent) event).getCreationTime(), | ||
| ((EnrichedEvent) event).getRegionId()); | ||
| } |
Contributor
There was a problem hiding this comment.
There seem to be many similar methods.
Is it possible to do some extraction?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Description
This PR has guaranteed that: No more newly generated event will be sent after a successful pipe drop.
Contents:
Test
Reuse pipe (empty + data) -> kill receiver -> drop data pipe


This PR has:
for an unfamiliar reader.
for code coverage.
Key changed/added classes (or packages if there are too many classes) in this PR