Fix close method of TopOperator and make close method of Operator an interface#11647
Merged
JackieTien97 merged 4 commits intomasterfrom Nov 30, 2023
Merged
Fix close method of TopOperator and make close method of Operator an interface#11647JackieTien97 merged 4 commits intomasterfrom
JackieTien97 merged 4 commits intomasterfrom
Conversation
|
SonarCloud Quality Gate failed.
|
Beyyes
reviewed
Nov 30, 2023
| public LocalSinkChannel(SharedTsBlockQueue queue, SinkListener sinkListener) { | ||
| this.sinkListener = Validate.notNull(sinkListener); | ||
| this.queue = Validate.notNull(queue); | ||
| this.sinkListener = Validate.notNull(sinkListener, "sinkListener can not be null."); |
Member
There was a problem hiding this comment.
Use Validate.method(xx, string) may be time-consuming in cpu-bound situation such as benchant/tsbs, because it must construct a string object.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #11647 +/- ##
=========================================
Coverage 49.01% 49.01%
- Complexity 24898 24911 +13
=========================================
Files 2815 2815
Lines 176117 176177 +60
Branches 21125 21148 +23
=========================================
+ Hits 86322 86357 +35
- Misses 89795 89820 +25 ☔ View full report in Codecov by Sentry. |
JackieTien97
approved these changes
Nov 30, 2023
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.










This PR adds a close method to TokOperator, ensuring that its child Operators are properly closed when it is closed, and guaranteeing that the SourceHandle and SinkChannel of the data transmission module are correctly cleaned up even when the query times out.
The close method of the Operator should be an interface, and the implementation of a new Operator must include logic for resource cleanup.