github-code-scanning[bot] commented on code in PR #13706:
URL: https://github.com/apache/druid/pull/13706#discussion_r1096932621
##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/TombstoneHelper.java:
##########
@@ -122,10 +125,108 @@
return retVal;
}
- private DataSegment createTombstoneForTimeChunkInterval(String dataSource,
String version, ShardSpec shardSpec, Interval timeChunkInterval)
+ public Set<DataSegment> computeTombstonesForReplace(
+ List<Interval> intervalsToDrop,
+ List<Interval> intervalsToReplace,
+ String dataSource,
+ Granularity replaceGranularity
+ ) throws IOException
{
+ Set<Interval> tombstoneIntervals = computeTombstoneIntervalsForReplace(
+ intervalsToReplace,
+ intervalsToDrop,
+ dataSource,
+ replaceGranularity
+ );
+ Set<DataSegment> tombstones = new HashSet<>();
+ for (Interval tombstoneInterval : tombstoneIntervals) {
+ final List<TaskLock> locks = taskActionClient.submit(new
LockListAction());
+ String version = null;
+ for (final TaskLock lock : locks) {
+ if (lock.getInterval().contains(tombstoneInterval)) {
+ version = lock.getVersion();
+ }
+ }
+ if (version == null) {
+ // Unable to fetch the version number of the segment
+ throw new ISE("Unable to fetch the version of the segments in use. The
lock for the task might"
+ + "have been revoked");
Review Comment:
## Missing space in string literal
This string appears to be missing a space after 'might'.
[Show more
details](https://github.com/apache/druid/security/code-scanning/4233)
--
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]