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/04/02 01:14:43 UTC

[GitHub] [druid] loquisgon opened a new pull request #12392: Make tombstones ingestible by having them return an empty result set.

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