sync: a page is stored in one transaction with parallel verification; a sync is cut off by idleness, not a fixed 2 minutes
20,000 listings to a newcomer: 120 s (unfinished) -> 24 s. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
@@ -747,6 +747,15 @@ Findings (see "What is left" in SPECS.md for the open ones):
|
||||
(WAL mode: no corruption on a crash, only the last few commits may be lost,
|
||||
and listings come back from peers) the same sync took 63 s for all 20,140.
|
||||
The store now uses `NORMAL`.
|
||||
|
||||
Two more changes make a big catch-up faster and no longer depend on a
|
||||
fixed deadline. A sync page is stored in one transaction
|
||||
(`Store.PutMany`), with the signature checks spread over the cores, and
|
||||
a sync is cut off after 2 minutes *without progress* (any record, request
|
||||
or stored page counts) or 30 minutes in all, instead of 2 minutes flat.
|
||||
One newcomer following two regions of a node that holds 20,000 listings
|
||||
(same machine, same data): old store 120 s, cut off at 15,126 of 20,000;
|
||||
`synchronous=NORMAL` 38 s for all; plus pages in one transaction 24 s.
|
||||
2. **Peer limits are crude.** The first run had no peer scoring: the attacker
|
||||
stayed connected to all 10 nodes it dialed after 500 bad messages. Now every
|
||||
node counts, per relaying peer and minute, the messages it gets (over 1200
|
||||
|
||||
Reference in New Issue
Block a user