This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 34604d233f4 docs: clarify Redis maintenance for CeleryExecutor (#67393)
34604d233f4 is described below

commit 34604d233f452e1c4262c2a3edd72690330ac196
Author: Silva Dev BR <[email protected]>
AuthorDate: Sat Jul 4 15:28:48 2026 -0300

    docs: clarify Redis maintenance for CeleryExecutor (#67393)
---
 providers/celery/docs/celery_executor.rst | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/providers/celery/docs/celery_executor.rst 
b/providers/celery/docs/celery_executor.rst
index c75d147c728..045cec72c9f 100644
--- a/providers/celery/docs/celery_executor.rst
+++ b/providers/celery/docs/celery_executor.rst
@@ -95,6 +95,27 @@ Some caveats:
 - Tasks can consume resources. Make sure your worker has enough resources to 
run ``worker_concurrency`` tasks
 - Queue names are limited to 256 characters, but each broker backend might 
have its own restrictions
 
+Redis maintenance
+-----------------
+
+When Redis is used as the Celery broker, Airflow uses it for transient Celery 
messages: queued task
+commands, task acknowledgement data, and other broker-side state. Airflow task 
history, Dag runs,
+connections, Variables, and XCom records are stored in the Airflow metadata 
database and should be
+maintained with database tooling such as ``airflow db clean``. Cleaning the 
metadata database does not
+clean Redis, and cleaning Redis does not clean Airflow's metadata database.
+
+Do not flush or delete keys from the Redis database used by Airflow while 
schedulers or Celery workers
+are running. Removing broker keys while tasks are queued, running, or being 
acknowledged can lose
+pending work or make task state temporarily inconsistent. If you need to 
discard stale broker data
+after an outage, first stop Airflow schedulers and Celery workers, make sure 
there are no tasks that
+you intend to preserve in ``queued`` or ``running`` state, back up the Redis 
database if it is
+persistent, and then remove only the Redis database or keyspace configured in 
``[celery] broker_url``.
+
+If you configured Redis as the Celery ``result_backend``, the same maintenance 
window should also
+account for result backend keys. Deleting those keys can remove Celery task 
result information that the
+scheduler may still query. For production deployments, Airflow recommends a 
database-backed result
+backend so broker cleanup and task-result storage are handled separately.
+
 See :doc:`apache-airflow:administration-and-deployment/modules_management` for 
details on how Python and Airflow manage modules.
 
 Architecture

Reply via email to