[#34944] YSQL: Fix flaky TestPgListenNotify#testListenNotifyWithDbClone on sanitizer builds #39078
<!-- Reviewable:start -->
This change is <img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>
<!-- Reviewable:end -->
[ CSIweb for PR #39078](https://csiweb.dev.yugabyte.com/pull/39078)
AgentK has started reviewing this pull request — findings will be posted here shortly.
Pushes are not reviewed automatically. Comment /agentk review to ask for another pass — but please only after substantial changes, not on every small push, and not for a push that just addresses the review comments.
minor — The description says remove_tablet_server waits for DEFINITELY_NO_LEASE. ts_manager.cc:542-546 rejects the call with InvalidArgument instead. With the default lease and the test's 20 s sleep, removal would fail rather than slow down. This supports keeping the short lease here, so no code change is needed.
1 inline comment — 1 minor.
---
<sub>React 👍 or 👎 on each comment above — right or wrong, both train the reviewer, and it is the only signal that says which.</sub>
<sub><i>Reviewed by Golum 1.0</i></sub>
LGTM
please:
arpang
dhruva4869
Summary
TestPgListenNotify#testListenNotifyWithDbClonefails on ASAN builds in 5 of 21 runs (#34944). The clone'sCREATE DATABASE ... TEMPLATE yugabytefails withCannot allocate a new object identifier: The OID cache invalidation count is unavailable because this TServer does not hold a current xCluster-guarded information lease; retry later.TestPgListenNotifysetxcluster_guarded_lease_duration_msto 5 s for the whole class, although onlytestSlotCleanupOnTServerDecommissionneeds it:remove_tablet_serverwaits until the master marks the killed TServer as definitely holding no lease, a full lease duration after its last heartbeat. IntestListenNotifyWithDbClone, the snapshot schedule makes the master leader flush the sys catalog, which took 5.04 s on an ASAN build, and no TServer renewed its lease meanwhile. In a failed CI run, all three TServers lost the lease together 4.7 s into that flush, and the clone's OID allocation was refused.The short lease now applies only to
testSlotCleanupOnTServerDecommission, which restarts its cluster with it; the test already recreates the cluster afterwards. Every other test in the class gets the default 2-minute lease.Closes #34944
Test plan
TestPgListenNotify#testListenNotifyWithDbCloneandTestPgListenNotify#testSlotCleanupOnTServerDecommissionon a debug build.TestPgListenNotify#testListenNotifyWithDbClonein this PR's ASAN CI job.🤖 Generated with Claude Code