Repository navigation
perf(mirrors): skip unchanged scans and empty range batches - #676
Merged
Merged
Conversation
nixuuu
marked this pull request as ready for review
November 13, 2026 23:05
This was referenced Nov 16, 2026
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.
Caught-up thread mirrors performed an empty range read and durable ACK every five seconds. Use the existing heartbeat instead, and reuse the thread-head snapshot until the owner replication clock changes. Real batches retain the single outstanding batch, 64-record/64 KiB limits and ACK-after-commit contract. Debouncing those ACKs would stall this flow-control protocol.
Fixes: #539
Paired local workload on dev 7137e9a: two linked desktop gateways, desktop SSE plus mobile Connect simulation, 12 idle threads each, diagnostics enabled, 5 s warmup then 30 s. Measured independently of the shared-cache fix in #675. The measurement harness is in #675; use the identical harness against both revisions.
The GetComputers reduction follows removal of idle mirror commits; #675 also handles repeated presence during actual updates. Active ACK rates depend on real writes and retain the existing batching cadence. These idle numbers are not a throughput claim.
Validation: check:tmp on thread-ranges (10 passing tests, including new idle heartbeat assertion, lost ACK/restart, ownership, gap repair, batch limits, live metadata and healthy unary); thread-range-move-controls; paired workload and cleanup; full typecheck; focused lint/format. Install, generation, full lint/format and web build were also checked in this task against the same dev base. Full local check:tmp is deferred to CI because unrelated heavy suites already load the host. No mobile/native code or fingerprint changes; device host remains unavailable.