ExternalTableSyncTask.
Retention keeps a bounded list of active snapshots, preserves the current in-progress snapshot, deletes Pinot segments no longer referenced by retained snapshots, and sweeps old orphan snapshot artifact directories.
What retention manages
Snapshot-processing ingestion writes artifacts under a snapshot directory. A snapshot directory can contain:final.parquet, the merged file for a completed snapshot.- Batch Parquet files under
batches/for in-progress work. - Auxiliary files such as deletion-vector index artifacts.
Configure retention
Configure retention on the external table’sExternalTableSyncTask config.
Retention properties
Snapshot artifacts live under each component’s deep-store root at
snapshots/<tableNameWithType>/<snapshotId>/ — derived from controller.data.dir (controller), pinot.server.instance.segment.store.uri (server), and pinot.broker.data.dir (broker). The earlier iceberg.snapshotProcessing.snapshotDirURI override has been removed; if an old table config still carries it, it is ignored.In StarTree Cloud, controller-level retention cadence is managed by StarTree. Per-table retention properties are the normal user-facing controls.
Cleanup flow
Each retention run does the following for eligible external tables:- Reads the current Pinot ideal-state segment set.
- Reads the current ingestion watermark to find an in-progress snapshot, if any.
- Reads the active snapshot list.
- Evicts oldest active snapshots until the list has at most
maxActiveVersionsentries. - Builds a keep set from surviving snapshots’
final.parquetfiles and in-progress batch files. - Deletes Pinot segments not present in the keep set, using
deletedSegmentRetention. - Sweeps orphan snapshot directories older than the oldest surviving snapshot.
Verify retention behavior
Use the observability APIs to check the current watermark and snapshot artifacts. ThecheckpointValue field in the status endpoint response is the current watermark.
finalParquet should be available:
404:
Choosing retention values
Operational guidance
- Do not disable retention indefinitely on high-volume external tables; snapshot-processing artifacts can grow quickly.
- Keep
maxActiveVersionshigh enough to cover your operational rollback and audit window. - Keep
deletedSegmentRetentionaligned with incident response. A very short value can make rollback harder after an accidental eviction. - If retention logs report missing or corrupt
final.parquetfor a retained snapshot, the run skips pruning for that table and retries on the next tick. - If
finalParquetreturns404for a recent snapshot, check the checkpoint state. It may still beIN_PROGRESS,FAILED, or already evicted by retention.

