Skip to content

v0.9.0-rc.38

Choose a tag to compare

@github-actions github-actions released this 10 Jun 04:25
· 12 commits to main since this release
b2beca3

Circuit-breaker isolation, FullHistory sync performance, and operator lifecycle config.

Added

  • AutomergeBackendConfig gains ttl_config: Option<TtlConfig> and gc_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: direct AutomergeBackendConfig { … } 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::Document no 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_error routed all errors — including Document — through record_failure, so a burst of document-level errors could open the circuit breaker and block subsequent syncs to a healthy peer. Fixed via SyncError::affects_peer_circuit_breaker() predicate + record_local_error path (advances diagnostic counters only, not consecutive_failures, retry_attempt, or consecutive_successes).
  • FullHistory prepare_doc_for_sync no longer calls doc.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 uses initiate_delta_sync on the live doc object and never reads the snapshot. PreparedDoc.doc_bytes is now Option<Arc<Vec<u8>>>None for FullHistory (skips the O(N) save), Some for LatestOnly/WindowedHistory (unchanged). Bandwidth permit uses FULL_HISTORY_BANDWIDTH_FLOOR (64 KiB) rather than 0 to preserve QoS back-pressure.