LakshSingla commented on code in PR #14475:
URL: https://github.com/apache/druid/pull/14475#discussion_r1240367557
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/ControllerImpl.java:
##########
@@ -936,7 +936,12 @@ private List<SegmentIdWithShardSpec>
generateSegmentIdsWithShardSpecsForAppend(
}
}
- if (allocation == null) {
+ // Even if allocation isn't null, the overlord makes the best effort job
of allocating a segment with the given
+ // segmentGranularity. This is commonly seen in case when there is
already a coarser segment in the interval where
+ // the requested segment is present and that segment completely overlaps
the request. Throw an error if the interval
+ // doesn't match the granularity requested
+ if (allocation == null
+ ||
!IntervalUtils.doesIntervalMatchesGranularity(allocation.getInterval(),
segmentGranularity)) {
Review Comment:
Noted! I think we can make a new fault class then and signify to the user
the pre-existing segment so that the user can use `REPLACE`, change the
granularity in the query or not insert in the given time interval
--
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]