Skip to content

Conversation

@Jackie-Jiang
Copy link
Contributor

  • Decouple time-series query dispatcher from multi-stage query dispatcher given they don't share functionality
  • Fix the bug where we are not closing channels for TimeSeriesDispatchClient

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR decouples the time-series query dispatcher from the multi-stage query dispatcher, creating a dedicated TimeSeriesQueryDispatcher class with its own lifecycle management. The change removes shared functionality that wasn't actually being used between the two dispatchers and fixes a channel cleanup bug.

Key changes:

  • Moved time-series dispatch logic into a new dedicated TimeSeriesQueryDispatcher class
  • Fixed channel resource leak by implementing proper shutdown logic in the new dispatcher
  • Removed time-series dependencies from QueryDispatcher to simplify the multi-stage query dispatcher

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
TimeSeriesQueryDispatcher.java New dedicated dispatcher for time-series queries with channel lifecycle management
QueryDispatcher.java Removed time-series dispatch logic and related dependencies
TimeSeriesRequestHandler.java Updated to use the new TimeSeriesQueryDispatcher directly
BaseBrokerStarter.java Removed QueryDispatcher creation that was only needed for time-series queries
QueryDispatcherTest.java Updated test to pass new required Duration parameter

@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2026

Codecov Report

❌ Patch coverage is 0% with 58 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.30%. Comparing base (441765d) to head (267ac99).

Files with missing lines Patch % Lines
...dispatch/timeseries/TimeSeriesQueryDispatcher.java 0.00% 54 Missing ⚠️
...roker/requesthandler/TimeSeriesRequestHandler.java 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #17474      +/-   ##
============================================
- Coverage     63.30%   63.30%   -0.01%     
  Complexity     1476     1476              
============================================
  Files          3163     3164       +1     
  Lines        188817   188815       -2     
  Branches      28899    28899              
============================================
- Hits         119532   119529       -3     
+ Misses        60019    60016       -3     
- Partials       9266     9270       +4     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-11 63.26% <0.00%> (+<0.01%) ⬆️
java-21 63.23% <0.00%> (-0.02%) ⬇️
temurin 63.30% <0.00%> (-0.01%) ⬇️
unittests 63.30% <0.00%> (-0.01%) ⬇️
unittests1 55.58% <0.00%> (-0.01%) ⬇️
unittests2 34.05% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Jackie-Jiang Jackie-Jiang force-pushed the decouple_time_series_query_dispatcher branch from dfc7010 to 267ac99 Compare January 8, 2026 01:37
@Jackie-Jiang Jackie-Jiang merged commit ec9b0c6 into apache:master Jan 8, 2026
18 checks passed
@Jackie-Jiang Jackie-Jiang deleted the decouple_time_series_query_dispatcher branch January 8, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix refactor timeseries-engine Tracking tag for generic time-series engine work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants