Skip to content

Feat/irokle: Replace automerge and gossip with a performance optimized version of irokle#296

Merged
St4NNi merged 233 commits into
mainfrom
feat/irokle_perf
Jun 29, 2026
Merged

Feat/irokle: Replace automerge and gossip with a performance optimized version of irokle#296
St4NNi merged 233 commits into
mainfrom
feat/irokle_perf

Conversation

@St4NNi

@St4NNi St4NNi commented Jun 15, 2026

Copy link
Copy Markdown
Member

This PR replaces the legacy Automerge/gossip-based metadata synchronization path with an irokle-backed document sync pipeline. It also hardens metadata replication with durable task/outbox persistence, improves cold-start recovery, and adds performance work across metadata materialization, and storage read / list operations.

Changes

  • Replace the legacy Automerge and gossip runtime with irokle-backed document synchronization for core metadata documents, realm configuration, and lifecycle events.
  • Add durable document sync outboxes, persistent task scheduling, failed-task rearming, and startup restoration so metadata sync work survives restarts and transient failures.
  • Introduce realm-scoped sync placements, peer refresh/backfill logic, and node/topic diagnostics to make replication targets explicit and easier to inspect.
  • Rework metadata handling around event-sourced updates, deterministic actors, materialization queues, visible registry caching, and cache warming to reduce read-time work and improve convergence behavior.
  • Improve listing and storage performance with batched point reads, inclusive iterator start bounds, faster hash path handling, visible registry lookups, and ListObjectsV2 pagination/common-prefix optimizations.
  • Add stage, latency, queue-lag, DHT lookup, and replication telemetry to make sync throughput, tail latency, and backlog behavior observable during operation and tests.
  • Drastically improve performance by batching operations and reducing IO churn
  • Expand API support and tests around users, groups, info endpoints, onboarding, metadata CRUD, replication, cold starts, throughput, convergence tails, and query concurrency.
  • Update dependencies, doctor tooling, startup wiring, and diagnostics to support the new irokle-based sync architecture end to end.

St4NNi added 30 commits June 1, 2026 16:36
@St4NNi

St4NNi commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

This is a major update to this branch, it fixes several consistency and durability issues that might have been occurred when nodes are restarted during certain time-frames. Unfortunately this makes this PR even larger. It also fixes several styling issues and code smells like effects without operations etc.

Issue Fixed

The previous revision still left too much metadata, sync, and replication work dependent on API-side orchestration or transient in-memory queues. That made restart/failure recovery fragile and allowed protocol adapters to own side effects that should belong to operations. This update moves those responsibilities into operation-owned durable flows, removes legacy compatibility paths, and adds guards/tests so the architecture stays enforced.

Changes Since e8614ab

  • Moved metadata API orchestration into operations/src/metadata/api.rs, keeping API routes focused on request/response adaptation.
  • Added durable metadata queues for materialization, pending projection replay, and graph pruning, including startup restore/repair and retry/backoff behavior.
  • Added durable queues for blob/live replication and S3 reference metadata refresh work so replication tasks survive restarts and transient failures.
  • Added operation-owned onboarding finalization, onboarding secret state handling, and canonical user-token subject handling.
  • Added and expanded admin document reducer support for realm config, OIDC providers, users, groups, roles, and role assignments.
  • Hardened metadata visibility and lifecycle handling with durable tombstones, stale update fences, graph lifecycle checks, and deterministic document placement.
  • Hardened metadata auth and remote reads with shared bearer validation, validated token forwarding, realm-bound peers, and fail-closed conflict handling.
  • Removed legacy compatibility code, including the old visible registry cache owner and API-side S3 replication adapter.
  • Added Fjall persistence policy wiring, storage flush/sync effects, and durability documentation updates.
  • Improved status/telemetry/doctor support for metadata sync, queue behavior, token validation, and Craqle/Irokle inspection.
  • Added architecture guards for API side-effect boundaries and document-sync publishing ownership.
  • Added regression coverage for durable metadata updates, materialization recovery, graph prune queue recovery, metadata restart persistence, auth validation, distributed bearer forwarding, and document sync outbox recovery.
  • Fixed the nightly CI clippy failure in aruna-doctor/src/explorer.rs by replacing chunks_exact(40) parsing with as_chunks::<40>().

@St4NNi St4NNi merged commit 70ce224 into main Jun 29, 2026
18 checks passed
@St4NNi St4NNi deleted the feat/irokle_perf branch June 30, 2026 08:45
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.

2 participants