damnMeddlingKid opened a new issue #10553:
URL: https://github.com/apache/druid/issues/10553


   ### Affected Version
   
   tested on Druid v0.19
   
   ### Description
   
   According to the 
[documentation](https://druid.apache.org/docs/latest/tutorials/tutorial-compaction.html#compact-the-data-with-new-segment-granularity)
 using a compaction task to change the segment granularity of data will mark 
the old segments as unused.
   
    While testing this out I've noticed that segments don't get marked as 
unused when converting a higher segment granularity (Month) to a lower segment 
granularity (Day).
   
   Steps to reproduce:
   
   1) create a datasource with some data at a monthly granularity
   2) run a compaction task like 
   
   ```
   {
        "type": "compact",
        "dataSource": "your_datasource",
        "interval": "2020-10-01T00:00:00.000Z/P1M",
        "segmentGranularity": "DAY"
   }
   ```
   
   3) query the metadata store using 
   
   ```
   select start, used, datasource from druid_segments where 
datasource='your_datasource';
   ```
   
   expected: segments that start on the month are marked as used=false
   actual: all segments have used=true
   
   


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