jihoonson opened a new pull request #10728:
URL: https://github.com/apache/druid/pull/10728


   ### Description
   
   Currently, the compaction task throws an exception like below:
   
   ```
   java.lang.IllegalArgumentException: Empty list of intervals
           at 
org.apache.druid.java.util.common.JodaUtils.umbrellaInterval(JodaUtils.java:96) 
~[druid-core-0.20.0-iap3.jar:0.20.0-iap3]
           at 
org.apache.druid.indexing.common.task.CompactionIntervalSpec.validateSegments(CompactionIntervalSpec.java:82)
 ~[druid-indexing-service-0.20.0-iap3.jar:0.20.0-iap3]
           at 
org.apache.druid.indexing.common.task.CompactionTask$SegmentProvider.checkSegments(CompactionTask.java:834)
 ~[druid-indexing-service-0.20.0-iap3.jar:0.20.0-iap3]
           at 
org.apache.druid.indexing.common.task.AbstractBatchIndexTask.determineLockGranularityandTryLockWithSegments(AbstractBatchIndexTask.java:308)
 ~[druid-indexing-service-0.20.0-iap3.jar:0.20.0-iap3]
           at 
org.apache.druid.indexing.common.task.CompactionTask.isReady(CompactionTask.java:314)
 ~[druid-indexing-service-0.20.0-iap3.jar:0.20.0-iap3]
           at 
org.apache.druid.indexing.overlord.TaskQueue.manage(TaskQueue.java:261) 
[druid-indexing-service-0.20.0-iap3.jar:0.20.0-iap3]
           at 
org.apache.druid.indexing.overlord.TaskQueue.access$000(TaskQueue.java:75) 
[druid-indexing-service-0.20.0-iap3.jar:0.20.0-iap3]
           at 
org.apache.druid.indexing.overlord.TaskQueue$1.run(TaskQueue.java:151) 
[druid-indexing-service-0.20.0-iap3.jar:0.20.0-iap3]
           at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
[?:1.8.0_262]
           at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
[?:1.8.0_262]
           at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
[?:1.8.0_262]
           at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
[?:1.8.0_262]
           at java.lang.Thread.run(Thread.java:748) [?:1.8.0_262]
   ```
   
   This PR improves the error message as the current one is not easy to 
understand. Even after this change, the stack trace is still printed in the 
overlord logs in this case, which is not user-friendly. We should propagate 
task failures during scheduling to users.
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
      - [ ] using the [concurrency 
checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md)
 (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] added Javadocs for most classes and all non-trivial methods. Linked 
related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in 
[licenses.yaml](https://github.com/apache/druid/blob/master/licenses.yaml)
   - [ ] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [x] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold for [code 
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
 is met.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to