Skip to main content

Module debug_topic

Module debug_topic 

Source
Expand description

@schema reassembly for dora topic: rebuilding the self-describing Arrow IPC stream of each output sample a node publishes on zenoh, with the cache that lets a late watcher decode schema-once batches.

The daemon’s debug subscriber uses this to feed dora topic. It lives here so that a CLI subscribing to zenoh directly can rebuild the same frames (dora-rs/dora#4025).

Constants§

MAX_DEBUG_SCHEMAS
Retention bound for DebugSchemaCache, matching the node receive path’s InputDecoder (see MAX_RETAINED_SCHEMAS in dora-node-api’s ipc_encode).

Functions§

prepare_debug_topic_frame
Turn one sample observed by a debug subscriber into the (metadata, data) of a dora topic frame, or None to drop it.
rebuild_debug_topic_stream
Rebuild a self-describing Arrow IPC stream for a dora topic debug frame.
retain_debug_schema
Remember schema for hash in the debug cache (most-recent last), evicting the oldest entry beyond MAX_DEBUG_SCHEMAS. An already-retained hash is moved to the back without re-copying its bytes.
retain_published_schema
Remember a schema block received on an output’s @schema key. It is keyed by its FNV-1a hash, the hash the producer tags its schema-once batches with (see crate::schema_once::schema_block_and_hash).

Type Aliases§

DebugSchemaCache
Cached @schema bytes (keyed by their FNV-1a hash, most-recent last) for one debug-watched output, shared between the @schema subscriber callback and the data task. Retains several schemas — mirroring the node receive path’s InputDecoder retention — so an output that interleaves schemas (e.g. schema-once batches of schema A between large full streams of schema B) doesn’t have its schema-once schema clobbered, and a stale @schema history-query result arriving after an in-band prime can’t evict the fresher schema (both stay retained).