You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/02/28 16:45:39 UTC

[GitHub] [druid] gitmstoute opened a new issue #12288: Datasource Autocompaction stuck 'Awaiting First Run'

gitmstoute opened a new issue #12288:
URL: https://github.com/apache/druid/issues/12288


   ### Affected Version
   0.22.1
   
   ### Description
   I'm opening a ticket after having no luck with my druidforum post: https://www.druidforum.org/t/datasource-autocompaction-awaiting-first-run/7087.
   
   I’m trying to use Autocompaction to update a datasource segmentGranularity from ‘HOUR’ to ‘WEEK’. I’m testing with a small datasource (15mb / ~400,000 rows) which has many segments (5,000+).
   
       I submit a compaction config like:
   
   ```
   {
     "dataSource": "my_datasource",
     "taskPriority": 25,
     "inputSegmentSizeBytes": 419430400,
     "skipOffsetFromLatest": "P1M",
     "tuningConfig": {
       "partitionsSpec": {
         "type": "dynamic",
         "maxRowsPerSegment": 5000000
       },
       "type": "index_parallel",
       "forceGuaranteedRollup": false
     },
     "granularitySpec": {
       "segmentGranularity": "WEEK"
     }
   }
   ```
   
   - Both the web console and curl against the api (e.g. curl get against /druid/coordinator/v1/config/compaction/ ) show that my compaction config has been set/accepted.
   - There are segments going back to 2021-05, so there are plenty of candidate segments to compact based on `skipOffsetFromLatest`.
   - There are 3 worker slots available and relevant compaction TaskSlot variables are: `"compactionTaskSlotRatio" : 0.7, "maxCompactionTaskSlots" : 2147483647`
   
   I’m expecting autocompaction to start compacting based on this config.
   
   Instead, I find that in the unified-console, the dataSource Compaction column shows Awaiting first run and has been stuck like this for 24h+. Reviewing Coordinator logs, I don’t see any indication that compaction is even being attempted. No errors. If I grep “compact” in coordinator logs, nothing is returned except for a single line (see logs below). If I grep for “my_datasource” I see only indexing tasks.
   
   
   I made a [branch in my fork](https://github.com/gitmstoute/druid/commit/cb33ed6d2dfaadf0af48287ff21f271d52612a67) with a docker-compose, ingestion spec, and compaction spec which seems to reproduce the issue. Steps:
   
   1. run it: `docker-compose up`
   2. submit the ingestion spec: `curl -H 'Content-Type:application/json' -d "@ingestion-spec.json" -X POST http://localhost:8081/druid/indexer/v1/task`
   3. Let the datasource become fully available
   4. submit the compaction spec: `curl -H 'Content-Type:application/json' -d "@compaction-spec.json" -X POST http://localhost:8081/druid/coordinator/v1/config/compaction`
   
   
   I have tried many tweeks to the compaction config (e.g. segmentGranularity to day instead of week) but haven't been able to get compaction to start. There do not seem to be any logs indicating autocompaction tasks are being created / attempted. We have also tried restarting our cluster (and restarting the docker-compose also does not resolve the issue).
   
   If there are any more details I can provide, please let me know!


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org