Search index without an asynchronous feed
errorderived-store-without-cdc-or-rebuild
A search index is derived data and needs an asynchronous feed from a stream, change data capture or an indexing worker. Without one it is written inline on the request path, and it can never be rebuilt after it drifts.
- Severity
- error
- Selects
- every node of kind search-index
- Components in scope
- 32
It looks at every node of kind search-index, and fires when:
- — this does not hold:
- — the node has at least one asynchronous incoming edge from a stream, change-data-capture or worker
Search index '{{node.id}}' has no asynchronous feed from a stream, change data capture or worker. It cannot be rebuilt or kept in sync independently of the write path.Reference designs whose broken twin names this rule in its header. The gate reads the same header, and fails when a rule no design trips.
airbnb-searchreferencebooking-searchreferencefacebook-taoreferencegitlab-architecturereferencegrab-georeferenceinstagram-feedreferencelyft-envoyreferencenotion-shardingreferenceproximity-servicereferencestack-overflowreferencetinder-georeferencetwitch-livereferencetwitter-timelinereferenceuber-dispatchreferencex-recommendationreference
# yaml-language-server: $schema=../schema/rule.schema.json # A search index is derived data. If nothing feeds it asynchronously (a stream, change data # capture or an indexing worker) it is either written inline on the request path or never # rebuilt after drift. Tripped by: designs/twitter-timeline.broken.yaml schemaVersion: "1" type: "rule" id: "derived-store-without-cdc-or-rebuild" severity: "error" select: node: kind: "search-index" when: not: hasEdge: direction: "in" mode: "async" peerKind: ["stream", "change-data-capture", "worker"] message: "Search index '{{node.id}}' has no asynchronous feed from a stream, change data capture or worker. It cannot be rebuilt or kept in sync independently of the write path."