{"record":{"id":"4d8a305b0b9f78ec","repo":"quickwit-oss/quickwit","slug":"ingester-service-should-be-initialized","errorCode":null,"errorMessage":"ingester service should be initialized","messagePattern":"ingester service should be initialized","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-serve/src/lib.rs","lineNumber":1301,"sourceCode":"        generation_id = %chitchat_id.generation_id,\n        \"removing node `{}` from ingester pool\",\n        chitchat_id.node_id,\n    );\n    let node_id: NodeId = node.node_id.clone();\n    Change::Remove(node_id)\n}\n\nfn build_ingester_service(\n    node: &ClusterNode,\n    ingester_opt: Option<impl IngesterService>,\n    max_message_size: ByteSize,\n    grpc_compression_encoding_opt: Option<CompressionEncoding>,\n) -> IngesterServiceClient {\n    if node.is_self_node() {\n        // Here, since the service is available locally, we bypass the network stack\n        // and use the instance directly. However, we still want client-side\n        // metrics, so we use both metrics layers.\n        let ingester = ingester_opt.expect(\"ingester service should be initialized\");\n        let service = ingester_service_layer_stack(\n            IngesterServiceClient::tower().stack_layer(INGEST_GRPC_CLIENT_METRICS_LAYER.clone()),\n        )\n        .build(ingester);\n        return service;\n    }\n    IngesterServiceClient::tower()\n        .stack_layer(INGEST_GRPC_CLIENT_METRICS_LAYER.clone())\n        .stack_layer(TimeoutLayer::new(GRPC_INGESTER_SERVICE_TIMEOUT))\n        .build_from_channel(\n            node.grpc_advertise_addr,\n            node.channel(),\n            max_message_size,\n            grpc_compression_encoding_opt,\n        )\n}\n\nasync fn setup_searcher(","sourceCodeStart":1283,"sourceCodeEnd":1319,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-serve/src/lib.rs#L1283-L1319","documentation":"`build_ingester_service` reached the self-node branch but the optional ingester service instance was `None`, violating the internal invariant that a node listing itself as an ingester must have built and injected the local service. This expect is a programming/configuration wiring error, not a user-input error.","triggerScenarios":"Thrown at quickwit/quickwit-serve/src/lib.rs:1301 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the `ingester` service is enabled for this node (enabled_services / indexer/ingester split)","Ensure the ingester service was successfully built before serve_quickwit assembles the cluster changes","Report as a bug if the ingester service is enabled and initialized yet the expect still fires"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}