Repository navigation
[DISCUSS] A Hudi service node for live queries before streaming writes commit #21013
danny0405
started this conversation in
New Feature Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
An agent span reports a tool failure while a streaming writer is building its next Hudi commit. The operator debugging the trace wants to see that failure now. A snapshot reader can see it once the corresponding Hudi instant completes. Even a fast point lookup can spend most of its end-to-end latency waiting for publication. This gap arises with Flink streaming jobs, Spark Structured Streaming micro-batches, and custom ingestion services that publish Hudi commits periodically. Committing more often can reduce the wait, at the cost of more commit work and potentially smaller files. Hudi timeline
Could we introduce an optional Hudi service node that makes streaming writes queryable as soon as they are durable, before the next Hudi commit completes? 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 · LanceDB Realtime Engine · Lance MemWAL spec
One possible design
How writes reach live and snapshot readers
flowchart TD P["Streaming producer"] -->|Append mutations| L[("Durable partitioned log")] L -->|Consume for table writes| W["Hudi writer"] L -->|Consume for live indexing| S["Hudi service node"] W -->|Commit data and covered offsets together| T[("Hudi Merge-on-Read table")] T -->|Read a pinned snapshot| S S -->|Snapshot plus newer mutations| A["Live query client"] T -->|Completed snapshot| R["Snapshot reader"]The arrows follow the data. Once a mutation reaches the log, the service can index it while the writer prepares the next Hudi commit.
One live lookup across two Hudi commits
sequenceDiagram participant C as Trace UI participant S as Service node participant T as Hudi table Note over S: Shard A indexed through 108<br/>Span failure recorded at 104 C->>S: Look up the span S->>T: Pin snapshot C1 and read the span T-->>S: C1 covers A through 100 S->>S: Apply mutations 101 through 108 S-->>C: Failed span Note over T: C2 commits data and offset 105 together C->>S: Look up the same span again S->>T: Pin snapshot C2 and read the span T-->>S: C2 includes the failure at 104 S->>S: Apply mutations 106 through 108 S-->>C: Same failed spanThis example follows one shard with no further writes after offset 108. Each lookup pins a snapshot and uses its recorded offset to decide which later mutations to apply.
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 restart a writer after it has written data but before it publishes the commit. Run the same recovery test with two different ingestion engines. Compare against ordinary snapshot reads at the usual commit cadence and with more frequent commits. Measure p50/p95/p99 from event arrival to the first correct result, query latency under concurrent ingest, and CPU usage, object-store requests, and commit overhead 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 · Vector index tracking issue
I’d especially like feedback on three questions before turning this into an RFC.
All reactions