Repository navigation
Conversation
Contributor
Dash performance benchmarks✅ all within thresholds
growth = late-third / early-third per-op time; ~1 is flat, a large value means the per-op cost scales with accumulated state. machine scale vs baseline: 0.61x - divided out of the baseline ratios so they compare like for like (the absolute warn/fail ceilings are left un-scaled); calibrated on |
|
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.



Under load,
LocalSharedStoragecould elect a second owner while the first was still running. The new owner started with an empty store, so every open stream got areset.A worker that can't reach the owner re-elects.
_unix_is_staledecided whether the owner's socket file was dead with a connect probe, and treated anyOSErroras dead. A live owner too busy to accept (itslisten(128)backlog full, so the 0.5 s probe times out) was judged dead. The worker then unlinked its socket and bound a new one, splitting the store in two. With 4 uvicorn workers at 4000 streaming browsers this happened in about 2 of 11 runs, and every downlink reset.The probe now decides:
.addradvertisement. An advertisement from an older Dash has no pid and keeps the old behavior.Tests in
tests/shared_storage/test_local_cross_process.py:test_busy_owner_is_not_replacedpauses the owner process withSIGSTOPand fills its accept backlog. A client that re-elects must stay a client and still read the owner's data afterSIGCONT. It fails without the fix.test_stale_socket_probecovers a missing file, a socket file with no listener, a stray regular file, and the macOS rule (live pid, dead pid, no advertisement).test_reelection_after_owner_killedstill passes: a killed owner is still replaced.Load test (4 uvicorn workers, 4000 browsers, with #4184 merged in locally so its cut-off streams don't hide the result): 6 runs back to back, no resets and no errors.