kfaraz commented on code in PR #14980:
URL: https://github.com/apache/druid/pull/14980#discussion_r1325507787
##########
extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/test/MSQTestControllerContext.java:
##########
@@ -215,6 +216,12 @@ public void close()
}
};
+ @Override
+ public ServiceEmitter emitter()
+ {
+ return null;
Review Comment:
Or you can also use `StubServiceEmitter` too if you intend to capture and
verify metrics in the tests. Also, maybe instantiate this object just once and
not on every invocation of `emitter`.
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/ControllerImpl.java:
##########
@@ -1389,6 +1391,10 @@ private void publishAllSegments(final Set<DataSegment>
segments) throws IOExcept
SegmentTransactionalInsertAction.appendAction(segments, null, null)
);
}
+
+ task.emitMetric(context.emitter(), "ingest/tombstones/count",
tombstoneSize);
+ // segments count metric is documented to include tombstones
Review Comment:
```suggestion
// Include tombstones in the reported segments count
```
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/ControllerImpl.java:
##########
@@ -1344,6 +1345,7 @@ private void publishAllSegments(final Set<DataSegment>
segments) throws IOExcept
destination.getSegmentGranularity()
);
segmentsWithTombstones.addAll(tombstones);
+ tombstoneSize = tombstones.size();
Review Comment:
```suggestion
numTombstones = tombstones.size();
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]