Skip to content

[finding] driver-registry eviction is per-replica — the driver registry has no cluster propagation in either direction, so a deleted datasource still drains the replicas that did not serve the DELETE #13805

Description

@claude

Found while implementing #13578. That card fixed the eviction itself; this is the propagation half it explicitly declared out of scope rather than improvising.

The state today, measured

The ObjectQL driver registry has no cluster propagation in either direction:

So after #13578, DELETE /api/v1/datasources/:name recovers /api/v1/ready on the replica that served it, and the other replicas keep the stuck driver until they restart. Better than "restart every replica", still not "no restart".

Why this is NOT the #13405 / #13609 asymmetry

Worth stating, because the #13578 card carried that framing across and it does not transfer. #13405 (and #13609) describe the /api/v1/meta/datasource metadata registry, where create broadcasts cluster-wide and delete does not mirror it — a genuine asymmetry on a registry that HAS a broadcast path.

The driver registry is symmetric: neither half broadcasts. Adding a broadcast for delete alone would make delete more cluster-aware than create, which is a new asymmetry in the opposite direction rather than a repair.

What a fix needs to decide

This is design surface, not a defect fix, which is why #13578 filed it instead of building it:

  1. Which way. A push model (a cluster-scoped event on datasource writes, both create and delete, so the two stay symmetric) or a pull model (each replica reconciles its registry against the shared datasource records periodically, or on a probe). The pull model needs no new transport and is self-healing after a missed message; the push model recovers faster.
  2. Whose channel. EventScopeSchema already declares cluster scope with at-least-once delivery, and @objectstack/service-cluster implements transports — but nothing on the datasource path is wired to it, and packages/objectql taking a dependency on a cluster bus is a layering question in its own right.
  3. Idempotency. unregisterDriver returns true/false and is safe to repeat, so a duplicate delivery is already harmless; a create replay is not obviously so.

Refs


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions