Conversation
Drain indexing pipelines on planned teardowns instead of killing them: the source stops emitting, flushes the in-flight batches with a forced commit, and the pipeline exits on its own once everything is published and settled. Sources opt in via source_needs_drain; others keep the plain kill semantics. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
NATS JetStream source binding to a pre-provisioned durable consumer: messages are acknowledged (server-confirmed) once the split containing them is published, and the pipeline drain settles in-flight messages on planned teardowns. Ships config, docs, tutorial, and broker tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drain every pipeline on teardown (sources without acknowledgment state exit as soon as their flush batch is pushed), share the drain state machine between both pipeline flavors, and fix the drain accounting: DrainAllPipelines now also waits for pipelines a plan change already detached, merge pipelines survive their draining indexing pipelines, and a paused draining pipeline is no longer reaped as exited. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
# Conflicts: # quickwit/quickwit-indexing/src/source/mod.rs
Bound the node-shutdown drain wait with a configurable indexer shutdown_drain_timeout (QW_INDEXER_SHUTDOWN_DRAIN_TIMEOUT, 300s by default) so a drain can no longer outlive the deployment's grace period. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…lled synchronously to match previous semantics
…lled synchronously to match previous semantics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current PR relies on #6768 which must be merged before. It will be rebased once done.
Description
Adds a NATS JetStream source consuming through a pre-provisioned durable consumer (fetch-only: never created, updated, nor deleted; must be AckExplicit). Stacked on #3 (pipeline drain), which it depends on.
Delivery semantics
suggest_truncate). The consumer's ack floor is the resume point; the metastore checkpoint only carries synthetic positions correlating published batches with their acks.ack_waitand indexed again.Also ships
num_pipelines > 1work-queue load balancing across pipelines sharing the consumer.traceparentpropagation into per-message spans.natsservice, coverage CI wiring, broker tests (nats-broker-testsfeature).Tests
cargo nextest run -p quickwit-indexing --features nats-broker-testsagainst the docker-compose NATS service: ingestion + ack floor, end-to-end graceful drain (pipeline exits on its own with acks confirmed flushed), work-queue load balancing across two pipelines, missing-consumer failure.Tested on a dev k8s cluster with continuous ingestion.
Benchmarks
Benchmarks were conducted on a 16 vCPU VM with Quickwit +
nats-server+ Kafka co-located on tmpfs with kafka acting as a baseline.otlp_*input formats) is what moves a workload off it.