loquisgon opened a new pull request #12392:
URL: https://github.com/apache/druid/pull/12392


   
   ### Description
   After tombstones were introduced compaction was made to work by having 
tombstones being skipped when they were read by the compaction task. This made 
compaction less intuitive for datasources with tombstones and also had an issue 
that reingesting a data source made only from tombstones made ingestion fail. 
In particular, auto-compaction in the coordinator would fail for a data source 
that contained only tombstones for the compaction interval chosen by the 
auto-compaction policy. This PR no longer skips tombstones fixing these issues.
   
   This change does not require any special upgrade or downgrade steps since it 
is functionally equivalent to the version before this change.
   
   ##### Key changed/added classes in this PR
    Class `org.apache.druid.indexing.common.task.CompactionTask` was previously 
skipping data segments for tombstones.
   Now it processes tombstones as other data segments that contain data, but 
creating an empty iterator for their data source since tombstones contain no 
data. It also avoids loading a `QueryableIndex` for them since they are not 
pushed to deep storage during ingestion. This processing is more aligned with 
how segments are compacted and ingested.
   
   <hr>
   
   <!-- Check the items by putting "x" in the brackets for the done things. Not 
all of these items apply to every PR. Remove the items which are not done or 
not relevant to the PR. None of the items from the checklist below are strictly 
necessary, but it would be very helpful if you at least self-review the PR. -->
   
   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/dev/license.md)
   - [ X] 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.
   - [X ] added integration tests.
   - [X ] 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.

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]

Reply via email to