Skip to content

always use StorageMonitor, also make StorageMonitor work for MSQ tasks#19048

Merged
gianm merged 6 commits into
apache:masterfrom
clintropolis:storage-monitor-improvements
Mar 3, 2026
Merged

always use StorageMonitor, also make StorageMonitor work for MSQ tasks#19048
gianm merged 6 commits into
apache:masterfrom
clintropolis:storage-monitor-improvements

Conversation

@clintropolis

Copy link
Copy Markdown
Member

Makes StorageMonitor, added in #18742, be always on. The low overhead seems worth the utility. Also added support for MSQ tasks to work correctly with this monitor, emitting extra taskId and groupId dimensions.

@github-actions github-actions Bot added Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 labels Feb 24, 2026

@capistrant capistrant left a comment

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.

code looks good. should we add docs though? especially now that the monitor is always on, I think it makes sense to get the metrics into the metrics table. Perhaps not blocking, I can flip to approve if you'd like to do it as a follow up

@clintropolis

Copy link
Copy Markdown
Member Author

i think i'd rather do as a follow-up since none of the vsf stuff is documented yet and just get this as part of that. I think its mature enough to start documenting in the next release

@capistrant capistrant left a comment

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.

I'm on board with a broader follow up for all vsf related docs

);
.manufacturate(new File(toolbox.getIndexingTmpDir(), "segment-fetch"), true);
final SegmentManager segmentManager = new SegmentManager(cacheManager);
final StorageMonitor storageMonitor = new StorageMonitor(cacheManager, Map.of("taskId", task.getId(), "groupId", task.getGroupId()));

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.

Best to pass in task::getMetricBuilder (a supplier of ServiceMetricEvent.Builder). It includes taskId and groupId, also some other stuff like dataSource.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ah nice, done 👍

@gianm
gianm merged commit a2a6981 into apache:master Mar 3, 2026
37 checks passed
@clintropolis
clintropolis deleted the storage-monitor-improvements branch March 4, 2026 02:10
@cecemei cecemei added this to the 37.0.0 milestone Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 jacoco:skip

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants