pinot icon indicating copy to clipboard operation
pinot copied to clipboard

Enable Consistent Data Push on Ingestion Jobs for REFRESH use case

Open yuanbenson opened this issue 3 years ago • 1 comments

Consistent data push protocol APIs are available via controller REST APIs such as startReplaceSegments, endReplaceSegments, and revertReplaceSegments. However, previously, ingestion jobs are not wired to use this feature.

Introduce a new boolean consistentDataPush in TableConfig->ingestionConfig->batchIngestionConfig that when enabled, supports batch ingestion in REFRESH mode to run in consistent data push mode.

Consistent push goal: supports atomic switching (on broker level) between data snapshots and eliminate the time period where the query is getting computed from inconsistent data mixed from existing and new data. Moreover, we aim to provide an easy way to rollback to the previous data in case of the bad data push.

See https://github.com/apache/pinot/issues/7813 for more details.

Some tasks breakdown associated with this issue:

  1. Improve test coverage for pinot-batch-ingestion-standalone jobs to cover SegmentMetadataPushJobRunner, SegmentTarPushJobRunner and SegmentUriPushJobRunner.
  2. Refactor the common logics out of all pushJobRunner(s) into a new abstract class BaseSegmentPushJobRunner.
  3. Main change on enabling consistent data push on ingestion jobs.

yuanbenson avatar Aug 22 '22 23:08 yuanbenson

One challenge to solve here is the segment name conflict. Currently the reason why batch replace cannot be enabled for REFRESH mode is because the segment will have the same name, thus directly replace the existing segment. cc @snleee

Jackie-Jiang avatar Aug 23 '22 23:08 Jackie-Jiang

Support for consistent push in ingestion jobs on standalone executor has been merged with #9295. Opening a new issue for Hadoop and Spark support.

yuanbenson avatar Sep 07 '22 18:09 yuanbenson