github-advanced-security[bot] commented on code in PR #18938:
URL: https://github.com/apache/druid/pull/18938#discussion_r2714642284
##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java:
##########
@@ -876,8 +877,17 @@
if (intervalToPartitions.isEmpty()) {
String msg = "No valid rows for range partitioning."
+ " All rows may have invalid timestamps or multiple
dimension values.";
- LOG.warn(msg);
- return TaskStatus.success(getId(), msg);
+
+ if (getIngestionMode() == IngestionMode.REPLACE) {
+ // In REPLACE mode, publish segments (and tombstones, when called
for) even when no new data was produced
+ publishSegments(toolbox, Collections.emptyMap());
+ TaskStatus taskStatus = TaskStatus.success(getId(), msg);
+ updateAndWriteCompletionReports(taskStatus);
+ return taskStatus;
+ } else {
+ LOG.warn(msg);
+ return TaskStatus.success(getId(), msg);
Review Comment:
## Deprecated method or constructor invocation
Invoking [TaskStatus.success](1) should be avoided because it has been
deprecated.
[Show more
details](https://github.com/apache/druid/security/code-scanning/10779)
##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java:
##########
@@ -876,8 +877,17 @@
if (intervalToPartitions.isEmpty()) {
String msg = "No valid rows for range partitioning."
+ " All rows may have invalid timestamps or multiple
dimension values.";
- LOG.warn(msg);
- return TaskStatus.success(getId(), msg);
+
+ if (getIngestionMode() == IngestionMode.REPLACE) {
+ // In REPLACE mode, publish segments (and tombstones, when called
for) even when no new data was produced
+ publishSegments(toolbox, Collections.emptyMap());
+ TaskStatus taskStatus = TaskStatus.success(getId(), msg);
Review Comment:
## Deprecated method or constructor invocation
Invoking [TaskStatus.success](1) should be avoided because it has been
deprecated.
[Show more
details](https://github.com/apache/druid/security/code-scanning/10778)
--
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]