AmatyaAvadhanula opened a new pull request, #16144:
URL: https://github.com/apache/druid/pull/16144

   ```
   Changes to `druid_pendingSegments` metadata table:
   
   group_id -> task replica group id for streaming ingestion
                     index_parallel task id for native batch ingestion
                     controller id for MSQ Insert
   
   parent -> The pending segment using which the current entry was upgraded
   
   
   
   * Pending segment clean up (Invoke on overlord directly instead of creating 
new task action)
   - When a ParallelIndexSupervisorTask or MSQController task exits, clean all 
pending segments associated with its id. Useful in the case of task failures
   - If a streaming ingestion job exits and there are no other active tasks 
corresponding to its base sequence name, clear all pending segments associated 
with it.
   
   
   Changes to task actions:
   
   * SegmentAllocateAction
   - Associate pending segment with group_id at the time of pending segment 
write to metadata store. parent = self
   
   
   * SegmentTransactionalReplace
   - For a replace lock held over an interval:
       transaction {
         commit input segments contained within interval
         upgrade ids in the upgradeSegments table corresponding to this task to 
the replace lock's version and commit them
         fetch payload, group_id for pending segments 
         upgrade each such pending segment to the replace lock's version with 
the corresponding parent
       }
       For every pending segment with version == replace lock version:
        Fetch payload, group_id or the pending segment and relay them to the 
supervisor
        The supervisor relays the payloads to all the tasks with the 
corresponding group_id to serve realtime queries
   
   
   * SegmentTransactionalAppend
   - For an append lock held over an interval:
       transaction {
         commit input segments contained within interval
         if there is an active replace lock over the interval:
           add an entry for the inputSegment corresponding to the replace 
lock's task in the upgradeSegments table
         fetch pending segments with parent contained within the input 
segments, and commit them
       }
   
   ```
   
   This PR has:
   
   - [ ] 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.
   - [ ] a release note entry in the PR description.
   - [ ] 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)
   - [ ] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [ ] 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.

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