[CELEBORN-2436] Speed up slow tests and fix LifecycleManager leaks in spark-it - #3817
Open
yew1eb wants to merge 2 commits into
Open
[CELEBORN-2436] Speed up slow tests and fix LifecycleManager leaks in spark-it#3817yew1eb wants to merge 2 commits into
yew1eb wants to merge 2 commits into
Conversation
… spark-it - DataPushQueueSuiteJ: reduce numPartitions from 1000000 to 30000 (28min -> ~56s) - QuotaManagerSuite: reduce case1/case2 scale from 1000x1000 to 100x100 (~11min -> ~3s) - RatisMasterStatusSystemSuiteJ: replace fixed sleeps with awaitCondition polling (3x180s -> 3x~53s) - spark-it: stop leaked LifecycleManager/ShuffleClient instances, and add the missing super.afterEach() in ChangePartitionManagerUpdateWorkersSuite so the LifecycleManagers created by the inherited WithShuffleClientSuite tests are stopped, eliminating the ~1h 'HeartbeatFromApplication failed' storm that stole CPU from subsequent suites
…ed one isLeader() returns true as soon as a node wins the election, but the leader rejects writes with LeaderNotReadyException until the no-op log entry for the new term is committed. Poll isLeaderReady() so tests do not race the readiness window on slower CI runners.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Test-only changes to cut CI wall time:
numPartitionsfrom 1,000,000 to 30,000.awaitCondition(BooleanSupplier)helper (100ms poll interval, 30s upper bound, falls back to the original assertion on timeout) and convert 38 fixedThread.sleepcalls — including the hard 15s leader-election wait — to condition polling. One negative assertion that must observe state not changing keeps a (reduced) fixed wait.LifecycleManager/ShuffleClientinstances inLifecycleManagerReserveSlotsSuite,LifecycleManagerSuiteandChangePartitionManagerUpdateWorkersSuite. The key fix is adding the missingsuper.afterEach()inChangePartitionManagerUpdateWorkersSuite: its parentWithShuffleClientSuitecreates LifecycleManagers viaprepareService()and relies on the trait'safterEachto stop them, so the override leaked 4 LifecycleManagers permanently.Why are the changes needed?
Several tests dominate CI time due to artificial data scale, fixed sleeps, and leaked LifecycleManagers whose app-heartbeat threads keep flooding
AskSync HeartbeatFromApplication failedfor the rest of the forked JVM (forkMode=once), stealing CPU from subsequent suites.Measured locally:
HeartbeatFromApplication faileddrops from a continuous storm to 6 benign shutdown-race occurrencesDoes this PR resolve a correctness bug?
Does this PR introduce any user-facing change?
How was this patch tested?
tests/spark-itrun (-Pspark-3.5): BUILD SUCCESSspotless:checkpasses for all touched modules