Skip to content

MDB-42341: handle exception in pg_wal_replay_resume + fix race condition in cascade#158

Open
aak74 wants to merge 2 commits into
yandex:mainfrom
aak74:MDB-42341-test-flap
Open

MDB-42341: handle exception in pg_wal_replay_resume + fix race condition in cascade#158
aak74 wants to merge 2 commits into
yandex:mainfrom
aak74:MDB-42341-test-flap

Conversation

@aak74

@aak74 aak74 commented Apr 30, 2026

Copy link
Copy Markdown
Collaborator

Wrap WAL replay resume logic in try/except to prevent unhandled exceptions from crashing the iteration. On failure, a warning is logged with traceback and the operation is retried on next cycle.

Fix race condition in cascade.feature

@aak74 aak74 requested a review from a team as a code owner April 30, 2026 08:52
@aak74 aak74 changed the title MDB-42341: handle exception in pg_wal_replay_resume MDB-42341: handle exception in pg_wal_replay_resume + fix race condition in cascade Apr 30, 2026
primary_unavailability_timeout: 2
recovery_timeout: 30
commands:
generate_recovery_conf: /usr/local/bin/gen_rec_conf_without_slot.sh %m %p

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with this scenario is actually here: recovery_conf generation command generates primary_conninfo without slots requirement, so replicas connect to master even before slots are created.
This ruins the scenario which otherwise would work.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scenario assumes that slots will be created automatically. That is, the command looks like the right one.

Scenario Outline: Replication slots created automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants