{"record":{"id":"29a3bf3032d57213","repo":"quickwit-oss/quickwit","slug":"position-of-a-kinesis-shard-should-never-be-eof","errorCode":null,"errorMessage":"position of a Kinesis shard should never be EOF","messagePattern":"position of a Kinesis shard should never be EOF","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-indexing/src/source/kinesis/kinesis_source.rs","lineNumber":156,"sourceCode":"    ) {\n        if self.state.shard_consumers.contains_key(&shard_id) {\n            info!(\n                stream_name = %self.stream_name,\n                shard_id = %shard_id,\n                \"Shard consumer already exists, skipping creation.\"\n            );\n            return;\n        }\n\n        let partition_id = PartitionId::from(shard_id.as_str());\n        let from_position = checkpoint\n            .position_for_partition(&partition_id)\n            .cloned()\n            .unwrap_or(Position::Beginning);\n        let from_sequence_number_exclusive = match &from_position {\n            Position::Beginning => None,\n            Position::Offset(offset) => Some(offset.to_string()),\n            Position::Eof(_) => panic!(\"position of a Kinesis shard should never be EOF\"),\n        };\n        info!(\n            stream_name = %self.stream_name,\n            shard_id = %shard_id,\n            start_position = ?from_position,\n            \"Spawning new shard consumer\"\n        );\n        let shard_consumer = ShardConsumer::new(\n            self.stream_name.clone(),\n            shard_id.clone(),\n            from_sequence_number_exclusive,\n            self.backfill_mode_enabled,\n            self.kinesis_client.clone(),\n            self.shard_consumers_tx.clone(),\n            self.retry_params,\n        );\n        let _shard_consumer_handle = shard_consumer.spawn(ctx);\n        let shard_consumer_state = ShardConsumerState {","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-indexing/src/source/kinesis/kinesis_source.rs#L138-L174","documentation":"build_indexing_service wires the indexing service client. For the local node it expects `indexing_service_opt` to hold the initialized indexing service mailbox; `.expect` fires if it is None. The indexing service must be created during node startup before any client (including the local, network-bypassing one) is built.","triggerScenarios":"Building an indexing client for a self-node when the indexing service was never started — e.g. the node config disables the indexer role but indexing tasks are still scheduled onto this node.","commonSituations":"A node launched without the indexer/indexer role receiving indexing assignments; control-plane placement scheduling tasks to a node that does not run the indexer; tests or code constructing the service map before the indexing actors exist.","solutions":["Enable the indexer role in the node configuration so the indexing service is initialized at startup.","Fix control-plane/placement logic so indexing tasks are only assigned to nodes that run the indexer.","Ensure node initialization order creates the indexing service before build_indexer_insert_change runs.","Check Chitchat membership for stale self-node detection."],"exampleFix":"// before\nlet indexing_service_mailbox =\n    indexing_service_opt.expect(\"indexing service should be initialized\");\n// after\nlet indexing_service_mailbox = indexing_service_opt.ok_or_else(|| {\n    anyhow::anyhow!(\"indexing service is not initialized on this node; is the indexer role enabled?\")\n})?;","handlingStrategy":"validation","validationCode":"// ensure the indexer role is enabled before building indexing clients\nif !config.indexer.is_configured() {\n    return Err(anyhow!(\"indexer role missing from node config; indexing service will not be initialized\"));\n}","typeGuard":null,"tryCatchPattern":"// isolate service construction during node bootstrap:\nlet res = std::panic::catch_unwind(|| build_indexer_insert_change(deps));","preventionTips":["Enable the indexer role on nodes that receive indexing assignments.","Verify control-plane placement only targets indexer-capable nodes.","Initialize the indexing service before any client construction at bootstrap.","Add CI coverage for nodes started without the indexer role."],"tags":["rust","grpc","indexing","service-initialization","internal-invariant"],"backgroundTag":"missing-required-config","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}