# Pipeline Backfill Batching Design

## Goal

This change reduces the operational cost of pipeline catch-up after downtime or backlog.

Instead of backfilling one very large time window, the pipeline catches up in bounded batches.

## Main Design

- enable batched backfill mode
- configure a bounded batch size
- keep acknowledged-timestamp semantics unchanged

Current intended config shape:

```yaml
batch_mode: true
batch_size: "5m"
```

## Why It Matters to TiDB-X Rollout

The TiDB-X rollout increases surface area:

- more service plans
- more new pipelines
- more chances to observe delayed startup or recovery

Bounded backfill makes those recoveries cheaper and more predictable.

## Correctness Boundary

This is not a semantics change for metrics.

The durable progress rule remains:

- advance persistent progress only after successful downstream export

So batching changes retry size and recovery behavior, not output correctness rules.

## What Reviewers Should Check

- backfill range generation is capped when batching is enabled
- retries replay only one bounded batch
- near-real-time behavior is unchanged when backlog is small
- config rendering enables the intended batching behavior
