[#38397] YSQL: Ignore SIGINT in the notifications poller #39020
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.35) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 178 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.310
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #39020"
general
weight: 0.35
arpang
Fixes #38397.
YbNotifsPollerMaininstalledSignalHandlerForShutdownRequestfor SIGINT, sopg_cancel_backend()on the notifications poller setShutdownRequestPendingand the poller exited withproc_exit(0). The postmaster unregisters a background worker that exits with code 0, so the poller was never restarted: listeners on the node received nothing from then on, with no error, and so did newLISTENs.As @arpang suggested on the issue, the poller now ignores SIGINT instead of exiting:
TerminateBackgroundWorkerstop the poller with SIGTERM, which is unchanged (FATAL, exit code 1, restarted).The
ShutdownRequestPendingcheck inybNotifsPollerLoopcould no longer be reached, so it is removed. The exit-0 paths for a stale poller and for a runtime error are unchanged.Testing
TestPgListenNotify#testCancelPollerKeepsDeliveringNotifications:LISTEN,pg_cancel_backend()on the poller, check the poller keeps the same PID, then check that a laterNOTIFYis delivered.