Last Updated: 3/19/2026
Pipeline Lifecycle
A Feldera pipeline progresses through multiple states during its lifetime, from initial creation through execution to shutdown. Understanding these states and transitions is essential for managing pipelines effectively.
Pipeline States
Runtime States
A pipelineβs runtime status indicates its current operational state:
- Unavailable β The pipeline has not been deployed or resources have been deallocated
- Coordination β Multi-host pipelines are coordinating between hosts
- Standby β The pipeline is waiting for activation (used when starting from a checkpoint)
- AwaitingApproval β The pipeline is waiting for explicit user approval before bootstrapping
- Initializing β The pipeline is starting up and initializing connectors
- Bootstrapping β The pipeline is rebuilding state from storage or checkpoints
- Replaying β The pipeline is replaying logged inputs after a restart
- Paused β The pipeline is running but not processing inputs
- Running β The pipeline is actively processing inputs
- Suspended β The pipeline has been suspended (transitional state before stopping)
Desired States
The desired runtime status indicates the target state the pipeline should transition to:
- Unavailable β Scale resources to zero
- Coordination β Coordinate between hosts (multi-host only)
- Standby β Wait in standby mode for activation
- Paused β Run but do not process inputs
- Running β Actively process inputs
- Suspended β Suspend execution
State Transitions
Starting a Pipeline
When you start a pipeline, it transitions through several states:
- Unavailable β Initializing β Resources are provisioned and the pipeline process starts
- Initializing β Bootstrapping (if storage is enabled) β The pipeline loads state from storage
- Bootstrapping β Replaying (if fault tolerance is enabled) β The pipeline replays logged inputs
- Replaying β Running β The pipeline begins processing new inputs
If the pipeline is started in paused mode, the final state is Paused instead of Running.
Starting from a checkpoint:
When starting from a checkpoint in object storage with the standby option enabled:
- Unavailable β Standby β The pipeline waits in standby mode
- Standby β Bootstrapping (after activation) β The pipeline loads the checkpoint
- Bootstrapping β Running β The pipeline begins processing
Bootstrap policies:
When starting a pipeline, you can specify a bootstrap policy:
allowβ Automatically proceed with bootstrapping (default)rejectβ Fail if bootstrapping is requiredawait_approvalβ Wait in AwaitingApproval state for explicit user approval
Pausing a Pipeline
Pausing a pipeline stops input processing while keeping the pipeline running:
Running β PausedWhile paused:
- Input connectors stop reading data
- The pipeline maintains its state in memory or storage
- You can still push data via the API with the
forceflag - Ad-hoc queries continue to work
- Output connectors remain connected
Resume the pipeline to transition back to Running.
Stopping a Pipeline
Stopping a pipeline deallocates resources and terminates the process. There are two stop modes:
Graceful stop (force=false):
- The pipeline creates a checkpoint (if fault tolerance is enabled)
- All connectors are gracefully shut down
- The pipeline transitions to Suspended
- Resources are deallocated and the state becomes Unavailable
Forced stop (force=true):
- The pipeline immediately scales resources to zero
- No checkpoint is created
- The state becomes Unavailable
After stopping, you must call start() again to restart the pipeline.
Restarting a Pipeline
The restart operation is a convenience method that combines stop and start:
pipeline.restart(bootstrap_policy=BootstrapPolicy.ALLOW)This performs a forced stop (no checkpoint) followed by a start with the specified bootstrap policy.
Managing Pipeline State
Checking Pipeline Status
Query the current runtime status:
from feldera import Pipeline, PipelineStatus
status = pipeline.status()
if status == PipelineStatus.RUNNING:
print("Pipeline is running")Wait for a specific status:
pipeline.wait_for_status(PipelineStatus.RUNNING, timeout=300)Controlling Execution
Start the pipeline:
pipeline.start() # Start in running state
pipeline.start_paused() # Start in paused state
pipeline.start_standby() # Start in standby statePause and resume:
pipeline.pause() # Pause input processing
pipeline.resume() # Resume input processingStop the pipeline:
pipeline.stop(force=False) # Graceful stop with checkpoint
pipeline.stop(force=True) # Immediate stop without checkpointActivation from Standby
When a pipeline starts in standby mode (typically when loading from a checkpoint), explicitly activate it:
pipeline.activate(wait=True, timeout_s=300)This transitions the pipeline from Standby to Bootstrapping and then to Running.
Approval for Bootstrapping
When a pipeline is started with bootstrap_policy=BootstrapPolicy.AWAIT_APPROVAL, it waits in the AwaitingApproval state. Approve it to proceed:
pipeline.approve()This is useful when you want to manually verify conditions before allowing the pipeline to bootstrap and potentially recompute large amounts of state.
Handling Errors
Deployment Errors
If a pipeline encounters an error during deployment or execution, the error is captured in the deployment_error field:
error = pipeline.deployment_error()
if error:
print(f"Pipeline error: {error}")Dismiss the error to allow the pipeline to be restarted:
pipeline.dismiss_error()Program Errors
Compilation errors are stored separately in the program_error field:
program_error = pipeline.program_error()
if program_error.get("sql_compilation", {}).get("exit_code", 0) != 0:
print("SQL compilation failed")Completion and Idle Detection
Waiting for Completion
Block until the pipeline has processed all inputs from finite input sources:
pipeline.wait_for_completion(timeout_s=600)This waits until:
- All input connectors have issued end-of-input notifications
- All received inputs have been fully processed
- All outputs have been sent through output connectors
This method blocks indefinitely if any input connector is a streaming source (like Kafka) that never ends.
Waiting for Idle
Wait for the pipeline to become idle (no processing activity):
pipeline.wait_for_idle(
idle_interval_s=5.0,
timeout_s=300.0,
poll_interval_s=0.2
)The pipeline is considered idle when:
- The number of input records equals the number of processed records
- These counts remain unchanged for the specified idle interval
Storage Management
Clearing Storage
Clear all pipeline storage (checkpoints and state):
pipeline.clear_storage(wait=True, timeout_s=300)Storage must be cleared before deleting a pipeline or when changing certain configuration options (like the number of workers).
Storage Status
Check the storage status:
from feldera import StorageStatus
status = pipeline.storage_status()
if status == StorageStatus.CLEARING:
print("Storage is being cleared")Storage states:
- NotBound β No storage is allocated
- Bound β Storage is allocated and ready
- Clearing β Storage is being cleared
- ClearingFailed β Storage clearing failed
Multi-Host Coordination
For multi-host pipelines (enterprise feature), the Coordination state is used to synchronize multiple pipeline instances:
Unavailable β Coordination β Initializing β ...During coordination, the pipeline instances establish communication and agree on work distribution before proceeding to initialization.
Whatβs Next
- Pipeline Configuration: Learn about all available configuration options
- Fault Tolerance: Understand checkpointing and recovery in detail
- Transactions: Use transactions for atomic batch ingestion