Skip to content

Fix CQ recovery gap and stale callback contamination#17734

Open
Caideyipi wants to merge 2 commits into
masterfrom
cq-fix
Open

Fix CQ recovery gap and stale callback contamination#17734
Caideyipi wants to merge 2 commits into
masterfrom
cq-fix

Conversation

@Caideyipi
Copy link
Copy Markdown
Collaborator

Description

This PR fixes two CQ issues in ConfigNode:

  • Recovering an ACTIVE CQ now resubmits the schedule task even if ConfigNode restarts between metadata activation and
    task submission.
  • CQ schedule tokens are now unique per create instance, so stale async callbacks from a dropped CQ cannot affect a
    recreated CQ with the same cqId.

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

@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

❌ Patch coverage is 37.25490% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.58%. Comparing base (7563ac8) to head (6f7a337).

Files with missing lines Patch % Lines
.../apache/iotdb/confignode/manager/cq/CQManager.java 4.34% 22 Missing ⚠️
...onfignode/procedure/impl/cq/CreateCQProcedure.java 64.28% 10 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #17734      +/-   ##
============================================
+ Coverage     40.55%   40.58%   +0.03%     
  Complexity     2574     2574              
============================================
  Files          5179     5179              
  Lines        349896   349941      +45     
  Branches      44727    44732       +5     
============================================
+ Hits         141890   142018     +128     
+ Misses       208006   207923      -83     

☔ 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.

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.

1 participant