Skip to content

fix(sync): yield while reconciling large directories - #11086

Open
norgan wants to merge 1 commit into
nextcloud:masterfrom
norgan:fix/discovery-entry-batching
Open

norgan wants to merge 1 commit into
nextcloud:masterfrom
norgan:fix/discovery-entry-batching

Conversation

@norgan

@norgan norgan commented Oct 16, 2026 •

Copy link
Copy Markdown

Fixing both lag and visibility of very large file stores

Implementation Detail
Directory reconciliation At most 128 entries or 8 ms per turn; one reusable nonzero timer
Scheduling Directory lookup and scheduling slot retained; child discovery after entry reconciliation
Cancellation Pending continuations stopped; direct-receiver cancellation and nested event-loop regression coverage
Independent branch Base 5bf7bdf42c30d93f9896d8fcbe1c44bbc58640af; no changes from #11087
Local Windows validation Result
Release client, RemoteDiscoveryTest and DiscoveryBench build Passed
RemoteDiscoveryTest 45 passed, 0 failed, 0 skipped
Original-base regression reproduction 4 expected failures: two large-directory yield rows and two cancellation rows
Changed-line clang-tidy and clang-format Passed; no source changes
Human review and DCO Reviewed and signed off
DiscoveryBench metric, milliseconds Baseline median (range) PR median (range)
Queued root-health reply delivery 1119 (1104–1544) 9 (9–10)
Maximum heartbeat gap 1345 (1324–1813) 269 (269–412)
Discovery 1467 (1444–1943) 1732 (1504–3194)
Complete fake sync 79292 (79180–86350) 81922 (79896–98303)
Benchmark conditions and limits Detail
Workload 1 directory, 5000 regular files, 5 parallel jobs; 3 interleaved baseline/PR pairs
Transport Queued fake replies; no socket or server latency
Correctness All 6 complete fake syncs successful; 5000 files each
Throughput improvement Not established
Complete large live sync Still running; completion unverified
macOS and Linux validation Not run in this Windows environment

AI assistance: Assisted-by: Codex:GPT-6 (implementation, tests, source analysis and validation).

Assisted-by: Codex:GPT-6
Signed-off-by: Norgan <nath@norgan.net>
@norgan
norgan force-pushed the fix/discovery-entry-batching branch from 8919c4b to 6e046de Compare October 18, 2026 02:21
@norgan
norgan marked this pull request as ready for review October 18, 2026 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant