Repository navigation
test: serialize embedded cluster lifecycles across UT processes - #26667
Conversation
Ubuntu/x86 UT repeated validation
All six valid UT samples verified Process-lifecycle admission validation
The log contains The five successful package-serial baseline jobs averaged 43m11s. A1 completed 8m29s faster (19.6%), and 6m32s faster than the fastest old successful sample (41m14s). A1 and A2 both activated process-lifecycle admission and passed without #26522 runtime signatures. A2 completed in 36m56s (34m11s Unit Testing). A3 is the new merge-main validation run and is currently in progress. |
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
Merge Queue Status
This pull request spent 29 seconds in the queue, including 2 seconds running CI. Required conditions to merge
|
What type of PR is this?
Which issue(s) this PR fixes:
issue #26522
What this PR does / why we need it:
Root cause
The Ubuntu/x86 UT job runs package tests with
UT_PARALLEL=6on an 8-core/16-GB runner. Several test binaries can therefore keep independent LogService/TN/CN clusters alive concurrently. Under that load, delayed Dragonboat ticks and HAKeeper heartbeat/proposal timeouts can prevent TN shard readiness and produce downstream connection resets.The previous startup lease serialized only cluster bootstrap. The first version of this PR serialized 12 complete packages, which removed overlapping cluster runtimes but added a roughly 14-minute serial CI phase. The shared base cluster also overrode the CN/TN heartbeat RPC deadline to 30 seconds, delaying the next heartbeat and schedule-command delivery when a request stalled.
Changes
pkg/testutil/clusteradmissionmodule backed by a runner-wide file lock;Startuntil all services have closed successfully;pkg/embedandpkg/tests/service;pkg/tests/txninherits it through the service cluster;optools/run_ut.shinstead of maintaining a separate 12-package serial list;This PR changes the test-cluster resource contract only. The production heartbeat/command-progress design remains tracked by #26566.
Validation
go test -race ./pkg/testutil/clusteradmission -count=1-short -race -p 6;-p 1as a local timing control;bash -n optools/run_ut.shmake err-checkgit diff --checkLocal 12-package comparison on the same machine:
-p 6-p 1The local comparison reduced elapsed time by 110.21 seconds (22%). The production Ubuntu/x86 job remains authoritative for both total CI duration and the original
waitAnyShardReadyLocked, delayedLocalTick, heartbeat timeout, and connection-reset signatures.