← Back to Pull requests

[#33294] YSQL: Keep LISTEN sticky in testNoDuplicateAfterRelistenWithSamePoller under ConnMgr #39088

Closed
unknown closed this pull request without merging on Nov 27, 2026 11:48 UTC
View on GitHub
unknown unknown commented on Nov 24, 2026 07:10 UTC
Author

Summary

Since 9397f246989 / D59470, a ConnMgr connection becomes unsticky once UNLISTEN leaves it listening on no channel. testNoDuplicateAfterRelistenWithSamePoller (#35386) runs UNLISTEN and then LISTEN on the same connection, and expects the backend to drop the notifications poller's replay of a transaction it already received before UNLISTEN. Under ConnMgr, the re-LISTEN can now run on a different backend, which never saw that transaction and delivers the replay, so the test fails with "Replay of a transaction received before UNLISTEN was delivered again". It has been flaky on master fastdebug (which runs Java tests with ConnMgr) since.

The test is about the backend-level duplicate detection, so this diff keeps LISTEN permanently sticky (the listen exclusion in ysql_yb_conn_mgr_reversible_stickiness_exclusions) for the duration of the test. setConnMgrReversibleStickinessExclusions now returns early when the test isn't running with ConnMgr and waits until the new value takes effect.

This diff was created by Claude Code (Claude Opus 5.5).

Test plan

With this change, testNoDuplicateAfterRelistenWithSamePoller passed 10 out of 10 local runs with ConnMgr (debug). Without it, it failed 5 out of 8 runs with "Replay of a transaction received before UNLISTEN was delivered again". Also ran it without ConnMgr, and testDisallowListenWithYbReadTime (which uses the changed helper) with and without ConnMgr.

./yb_build.sh debug --java-test 'org.yb.pgsql.TestPgListenNotify#testNoDuplicateAfterRelistenWithSamePoller' --enable-ysql-conn-mgr-test
./yb_build.sh debug --java-test 'org.yb.pgsql.TestPgListenNotify#testNoDuplicateAfterRelistenWithSamePoller'
./yb_build.sh debug --java-test 'org.yb.pgsql.TestPgListenNotify#testDisallowListenWithYbReadTime' --enable-ysql-conn-mgr-test
./yb_build.sh debug --java-test 'org.yb.pgsql.TestPgListenNotify#testDisallowListenWithYbReadTime'

Diff: 240 lines (+180 / -60) across 3 files Reviewer: arpang Review duration: 4598m
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 240 lines diff across 3 files
0.39
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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.328
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #39088"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 38.7% (MEDIUM) · Higher = larger blast radius
38.7%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 15.3% · Safe to merge
15.3%