Skip to content

Pipe: Do not listen to tsFiles when no sources need#17669

Open
Caideyipi wants to merge 2 commits into
masterfrom
assigner
Open

Pipe: Do not listen to tsFiles when no sources need#17669
Caideyipi wants to merge 2 commits into
masterfrom
assigner

Conversation

@Caideyipi
Copy link
Copy Markdown
Collaborator

Description

As the title said.


This PR has:

  • been self-reviewed.
    • concurrent read
    • concurrent write
    • concurrent read and write
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods.
  • added or updated version, license, or notice information
  • added comments explaining the "why" and the intent of the code wherever would not be obvious
    for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold
    for code coverage.
  • added integration tests.
  • been tested in a test IoTDB cluster.

Key changed/added classes (or packages if there are too many classes) in this PR

@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.42%. Comparing base (556cd66) to head (a805974).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #17669      +/-   ##
============================================
+ Coverage     40.38%   40.42%   +0.04%     
  Complexity     2574     2574              
============================================
  Files          5178     5179       +1     
  Lines        349134   349239     +105     
  Branches      44665    44673       +8     
============================================
+ Hits         140988   141188     +200     
+ Misses       208146   208051      -95     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +254 to 260
public synchronized boolean shouldListenToTsFile() {
return listenToTsFileSourceCount > 0;
}

public synchronized boolean shouldListenToInsertNode() {
return listenToInsertNodeSourceCount > 0;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Necessary to synchronize?

Comment on lines +57 to 65
dataRegionId2Assigner.compute(
dataRegionId,
(id, assigner) -> {
final PipeDataRegionAssigner actualAssigner =
assigner == null ? new PipeDataRegionAssigner(dataRegionId) : assigner;
actualAssigner.startAssignTo(source);
return actualAssigner;
});
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ComputeIfAbsent?

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants