sql: fix lease duration in TestReacquireLeaseOnRestart#157189
sql: fix lease duration in TestReacquireLeaseOnRestart#157189craig[bot] merged 3 commits intocockroachdb:masterfrom
Conversation
bdaa594 to
8debd83
Compare
Potential Bug(s) DetectedThe three-stage Claude Code analysis has identified potential bug(s) in this PR that may warrant investigation. Next Steps: Note: When viewing the workflow output, scroll to the bottom to find the Final Analysis Summary. After you review the findings, please tag the issue as follows:
|
a165f18 to
b2f1d17
Compare
Potential Bug(s) DetectedThe three-stage Claude Code analysis has identified potential bug(s) in this PR that may warrant investigation. Next Steps: Note: When viewing the workflow output, scroll to the bottom to find the Final Analysis Summary. After you review the findings, please tag the issue as follows:
|
b2f1d17 to
7619339
Compare
yuzefovich
left a comment
There was a problem hiding this comment.
Thanks!
@yuzefovich reviewed 1 of 1 files at r1, 1 of 1 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @stevendanna)
pkg/sql/txn_restart_test.go line 1302 at r2 (raw file):
params.Knobs.Store = storeTestingKnobs params.Knobs.KVClient = clientTestingKnobs params.DefaultTestTenant = base.TestTenantProbabilisticOnly
nit: simply leave DefaultTestTenant unset (which is the same as TestTenantProbabilisticOnly).
The test jumps the clock forward in order to expire KV leases. However, the DefaultDescriptorLeaseDuration constant that it chooses seems to be by mistake taken as the KV lease duration. Use the RangeLeaseDuration from the server config instead. This also fixes early SQL pod termination when multi-tenancy is enabled. Currently, the lifetime of the SQL pod is the same as that of the session, which has a TTL of 40s (server.sqlliveness.ttl setting). The 10 minute clock jump in this test was causing early SQL pod termination and flakes. Epic: none Release note: none
Epic: none Release note: none
Epic: none Release note: none
7619339 to
109bdbb
Compare
|
TFTR! bors r=yuzefovich |
The test jumps the clock forward in order to expire KV leases. However, the
DefaultDescriptorLeaseDurationconstant that it chooses seems to be by mistake taken as the KV lease duration. Use theRangeLeaseDurationfrom the server config instead.This also fixes early SQL pod termination when multi-tenancy is enabled. Currently, the lifetime of the SQL pod is the same as that of the session, which has a TTL of 40s (
server.sqlliveness.ttlsetting). The 10 minute clock jump in this test was causing early SQL pod termination and flakes.Resolves #156333