v0.9.0-rc.38
·
12 commits
to main
since this release
Circuit-breaker isolation, FullHistory sync performance, and operator lifecycle config.
Added
AutomergeBackendConfiggainsttl_config: Option<TtlConfig>andgc_config: Option<GcConfig>(peat-node#136). Optional background tasks for short-lived document eviction (TTL) and tombstone/implicit-TTL garbage collection.None(default) for both skips the respective background tasks — safe for test consumers and environments that manage TTL/GC externally. Breaking for struct-literal callers: directAutomergeBackendConfig { … }construction must now add..Default::default()as the final field. The struct is now#[non_exhaustive]to guard future additive fields against the same breakage pattern.
Fixed
SyncError::Documentno longer affects the peer circuit breaker (#246). Document errors (absent doc, corrupt bytes, deserialise failure) are local conditions that say nothing about peer health. Previously,handle_errorrouted all errors — includingDocument— throughrecord_failure, so a burst of document-level errors could open the circuit breaker and block subsequent syncs to a healthy peer. Fixed viaSyncError::affects_peer_circuit_breaker()predicate +record_local_errorpath (advances diagnostic counters only, notconsecutive_failures,retry_attempt, orconsecutive_successes).- FullHistory
prepare_doc_for_syncno longer callsdoc.save()(#236).doc.save()is O(edit-history depth); for FullHistory docs the snapshot bytes were only used for bandwidth-permit sizing, but FullHistory sync usesinitiate_delta_syncon the live doc object and never reads the snapshot.PreparedDoc.doc_bytesis nowOption<Arc<Vec<u8>>>—Nonefor FullHistory (skips the O(N) save),Somefor LatestOnly/WindowedHistory (unchanged). Bandwidth permit usesFULL_HISTORY_BANDWIDTH_FLOOR(64 KiB) rather than 0 to preserve QoS back-pressure.