Skip to content

Pause apply workers during slot creation to fix data loss on new node.#416

Open
ibrarahmad wants to merge 1 commit intov5_STABLEfrom
V5_SPOC-311
Open

Pause apply workers during slot creation to fix data loss on new node.#416
ibrarahmad wants to merge 1 commit intov5_STABLEfrom
V5_SPOC-311

Conversation

@ibrarahmad
Copy link
Copy Markdown
Contributor

An apply worker committing between ensure_replication_slot_snapshot and adjust_progress_info could advance spock.progress beyond the COPY snapshot boundary, causing the new node to skip those changes permanently.

Add an atomic pause flag and ConditionVariable in SpockContext. Apply workers check the flag in begin_replication_step and after handle_commit, sleeping until copy_replication_sets_data calls resume_apply_workers() after adjust_progress_info completes.

Add spock.pause_timeout GUC (default 10s) as a safety net against a crashed sync worker leaving workers paused indefinitely.

Backport of PR #392 from main, adapted for v5_STABLE architecture.

An apply worker committing between ensure_replication_slot_snapshot and
adjust_progress_info could advance spock.progress beyond the COPY
snapshot boundary, causing the new node to skip those changes permanently.

Add an atomic pause flag and ConditionVariable in SpockContext. Apply
workers check the flag in begin_replication_step and after handle_commit,
sleeping until copy_replication_sets_data calls resume_apply_workers()
after adjust_progress_info completes.

Add spock.pause_timeout GUC (default 10s) as a safety net against a
crashed sync worker leaving workers paused indefinitely.

Backport of PR #392 from main, adapted for v5_STABLE architecture.
@ibrarahmad ibrarahmad requested a review from mason-sharp April 13, 2026 15:29
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 13, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d3ba8277-7e10-4130-8bf8-0ec3f383bf1c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch V5_SPOC-311

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Apr 13, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

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.

1 participant