[#36720] YSQL: Stop the notifications poller from polling the master #38567
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 192 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.315
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #38567"
general
weight: 0.35
arpang
Summary
Notifications slots were created like any logical replication slot, with
detect_publication_changes_implicitlyset and the PG catalog tables in the stream. Every node's LISTEN/NOTIFY poller polled the sys catalog tablet on the master leader each round (~4-5GetChanges/s per node when idle), so a master leader change terminated every listener (#36720).A notifications slot streams only
pg_yb_notificationsthrough a fixed publication, so it needs none of what catalog polling detects. The master now creates notifications slots withoutdetect_publication_changes_implicitlyand without the catalog tables, so they use pub refresh (everycdcsdk_publication_list_refresh_interval_secs, default 15 min) instead. The poller still reads the catalog from the master once per pub refresh, and an error there is still fatal; that is tracked in #38556.Upgrade/Rollback safety
Only notifications slots created after the master upgrade change; existing ones keep catalog polling until recreated. Old and new tservers both support pub refresh, so mixed versions and rollback are safe.
Test plan
./yb_build.sh debug --java-test org.yb.pgsql.TestPgListenNotify: 37/37 pass (6 hit a local "insufficient disk space" setup error and passed on rerun). New tests:-
testPollerDoesNotPollMaster: masters serve noGetChangeswhile a listener idles.-
testNotificationsAcrossPubRefreshes: notifications keep arriving across 1s pub refreshes.🤖 Generated with Claude Code