Stream sync continues after Patroni config failures and loses slot deletion retries
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
調査の方向性
Start with the referenced synchronization paths in pkg/cluster/streams.go (around lines 169-175 and 430-462) and pkg/cluster/sync.go (around lines 967-1047). Trace how Patroni errors affect stream resource creation and how slot deletions are tracked, then inspect the related reconciliation tests. Done means failed slot configuration prevents stream updates, and deletion retries succeed after Patroni recovers.
索引モデルが issue の本文から書いたものです。
説明
Description
When stream synchronization cannot apply logical replication slots through Patroni, the operator still creates or updates FabricEventStream resources and reports the sync as successful. The generated resource can reference a PostgreSQL replication slot that was not created.
Failed slot deletions are also not retried. After a stream is removed, the PostgreSQL publication and FabricEventStream disappear, but the corresponding logical replication slot remains in PostgreSQL and Patroni after a later reconciliation. The same behavior occurs when deleting an explicit spec.patroni.slots entry and Patroni returns an error for PATCH /config.
These states can expose unusable stream configuration to consumers and leave logical replication slots retaining WAL indefinitely.
Relevant code:
- FES synchronization continues after the Patroni sync error
- Publication deletion produces a one-shot slot deletion request
- Tracked Patroni slots are deleted before
PATCH /configsucceeds
Environment
- Operator:
ghcr.io/zalando/postgres-operator:v2.0.3 - Kubernetes:
v1.33.1on kindv0.29.0 - Spilo:
ghcr.io/zalando/spilo-18:4.1-p2 - PostgreSQL:
18.3 - Patroni:
4.1.0 - Platform: local kind cluster on Linux
- Production: no, isolated reproduction
- Operator source:
61e4c9fa7ad37f1d4891a4b9ac99aec7b42c46d4
Steps to reproduce
Case 1: Create a stream while Patroni is unavailable
- Install the
FabricEventStreamCRD and create a one-instance PostgreSQL cluster with databasefoo. - Configure a stream for
foo.public.outboxand wait until its publication and logical slot are healthy. - Pause the Patroni process with
SIGSTOP, leaving PostgreSQL running. - Add a second stream with application ID
second-app. - Wait for reconciliation and inspect the resulting
FabricEventStream, PostgreSQL publications, and replication slots.
Case 2: Remove a healthy stream while Patroni is unavailable
- Start with a healthy stream whose publication,
FabricEventStream, PostgreSQL slot, and Patroni slot all exist. - Pause Patroni with
SIGSTOP. - Remove the stream from the PostgreSQL resource.
- Wait for the
FabricEventStreamand publication to be deleted. - Resume Patroni and trigger another reconciliation without restoring the stream.
The same deletion failure can be reproduced for an explicit slot under spec.patroni.slots: make Patroni reject PATCH /config, remove the slot from the PostgreSQL resource, restore Patroni, and reconcile again.
Observed behavior
For Case 1, the operator logs a Patroni GET /config timeout and then creates the FabricEventStream:
acid-stream-repro-xw1xw second-app fes_foo_second_app
publication_count|1
slot_count|0
The generated resource references fes_foo_second_app, but PostgreSQL does not contain that slot.
For Case 2, the first reconciliation completes the publication and CR cleanup but leaves the slot:
fes_count|0
publication_count|0
slot_count|1
After Patroni is resumed and reconciliation runs again, the slot is still present:
publication_count|0
slot_count|1
patroni_slot|{"database":"foo","plugin":"pgoutput","type":"logical"}
fes_count|0
For an explicit slot, Patroni returned HTTP 409 for {"slots":{"manual_repro":null}}. After access was restored and another reconciliation completed, manual_repro remained in both PostgreSQL and Patroni.
Expected behavior
- Do not create or update a
FabricEventStreamuntil all required Patroni slot configuration has been applied successfully. - Return or retry the failed synchronization instead of reporting success.
- Retain pending slot deletions until Patroni confirms the deletion, including across later reconciliations.
- Remove the slot from PostgreSQL and Patroni after access recovers without requiring the user to restore and remove the stream again.
- 主要言語
- Go
- スター
- 5.3k
- フォーク
- 1.1k
- 平均マージ
- 3日 17時間
- マージ済み PR(30日)
- 11
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
zalando/postgres-operator のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
zalando/postgres-operator#3257 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
zalando/postgres-operator#3254 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
zalando/postgres-operator#3253 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
zalando/postgres-operator#3252 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
zalando/postgres-operator#3182 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
zalando/postgres-operator の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
[inputs.internal] README lists go_version tag on internal_gather instead of internal_agent対応中かも @cvas22 が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
influxdata/telegraf#20264 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] Standalone migration breaks existing Ingress routes using the envoy-http Service port nameオープンaccepted bug wg/enterprise-environment
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
vllm-project/semantic-router#7483 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
stacklok/toolhive-catalog#2076 ·
メンテナーはふだん 1 日以内に返信
-
vulncheck or vulndb
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信