GitHub user danny0405 created a discussion: [DISCUSS] A Hudi service node for live queries between Flink checkpoints
An agent span reports a tool failure just after a Flink checkpoint. The operator debugging the trace wants to see that failure now. A Hudi snapshot reader can pick it up once the corresponding Hudi instant completes. Even a fast point lookup can spend most of its end-to-end latency waiting for the data to become visible. Shortening the checkpoint interval helps, but also changes checkpoint overhead, commit frequency, and file sizes. [Hudi Flink commit and recovery protocol](https://hudi.apache.org/blog/2026/06/10/stateless-global-upserts-for-flink-streaming-in-apache-hudi-1-2-0/) Could we introduce an **optional Hudi service node that makes durable writes queryable during the checkpoint interval**? Two workloads motivate this. A trace UI needs to load a run and find recent failures as spans start, finish, and receive corrections. An agent or retrieval pipeline needs to find a document it just ingested by key, text, or embedding while historical data remains searchable. SmithDB shows how a query service can read fresh segments from ingestion-node caches. LanceDB goes further by keeping live indexes on shard owners and acknowledging writes after they reach a durable log. [SmithDB architecture](https://www.langchain.com/blog/introducing-smithdb) · [LanceDB Realtime Engine](https://www.lancedb.com/blog/lancedb-real-time-engine) · [Lance MemWAL spec](https://lance.org/format/table/mem_wal/) ### One possible design - **Write once to a durable log.** The Flink pipeline emits its output mutations to a partitioned log. A long-running service node consumes them and maintains a live index for its assigned shards. A Hudi writer consumes the same mutations into a Merge-on-Read table. Applications query the service through a stable endpoint, including while Flink tasks restart or rescale. - **Read one snapshot plus the newer mutations.** Suppose a completed Hudi instant covers one shard through offset 100 and the service has indexed through 108. For a live lookup, the service applies 101–108 to that snapshot using the table’s merge and delete semantics. If the next instant covers through 105, the live portion starts at 106. The writer would publish the offsets it covered in the same Hudi commit as the data. Conventional snapshot readers would continue to use completed instants. - **Make freshness visible to callers.** A live response could identify its base instant and the positions it has served for each shard. This makes the distinction between a durable append, a mutation visible to the service, and a completed Hudi commit observable. How much of that detail a caller needs is an open question. ### What would make this worth running? I’d start with a keyed span lookup and a query for the 50 most recent failed spans in one project. Replay late updates and deletes, kill a service node, and restore the Flink job across a checkpoint. Compare against ordinary snapshot reads at both the existing and a shorter checkpoint interval. Measure p50/p95/p99 **from event arrival to the first correct result**, query latency under concurrent ingest, and the CPU, storage requests, and checkpoint cost at the same write rate. Once the Hudi writer catches up, the service and snapshot reader should agree on the same mutations. This would give us a baseline for extending live reads to text and vector search. [Full-text proposal](https://github.com/apache/hudi/pull/20478) · [Vector index tracking issue](https://github.com/apache/hudi/issues/19094) I’d especially like feedback on three questions before turning this into an RFC. 1. Which Hudi workload actually needs visibility inside the checkpoint interval? What latency does it need, and is a per-key or per-shard guarantee sufficient? 2. If an agent acts on a live result and Flink subsequently restores an older checkpoint, what must remain visible? What identity and replay guarantees would prevent duplicates, especially for stateful transformations? 3. Would you run this over an existing durable stream of output mutations, or does the use case justify Hudi owning the log and shard recovery? The existing Spark serving endpoint discussion is a natural place to consider how clients could access either design. [Related serving discussion](https://github.com/apache/hudi/discussions/19843) GitHub link: https://github.com/apache/hudi/discussions/21013 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
