{"record":{"id":"5819af227d35da9f","repo":"cube-js/cube","slug":"cachestore-cannot-be-used-on-the-worker-node-queu-5819af","errorCode":null,"errorMessage":"CacheStore cannot be used on the worker node! queue_add was used.","messagePattern":"CacheStore cannot be used on the worker node! queue_add was used\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs","lineNumber":1996,"sourceCode":"    }\n\n    async fn queue_all(&self, _limit: Option<usize>) -> Result<Vec<QueueAllItem>, CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! queue_all was used.\")\n    }\n\n    async fn queue_results_all(\n        &self,\n        _limit: Option<usize>,\n    ) -> Result<Vec<IdRow<QueueResult>>, CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! queue_results_all was used.\")\n    }\n\n    async fn queue_results_multi_delete(&self, _ids: Vec<u64>) -> Result<(), CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! queue_results_multi_delete was used.\")\n    }\n\n    async fn queue_add(&self, _payload: QueueAddPayload) -> Result<QueueAddResponse, CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! queue_add was used.\")\n    }\n\n    async fn queue_add_and_retrieve(\n        &self,\n        _payload: QueueAddAndRetrievePayload,\n    ) -> Result<QueueAddAndRetrieveResponse, CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! queue_add_and_retrieve was used.\")\n    }\n\n    async fn queue_clear(&self) -> Result<(), CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! queue_clear was used.\")\n    }\n\n    async fn queue_to_cancel(\n        &self,\n        _prefix: String,\n        _orphaned_timeout: Option<u32>,\n        _heartbeat_timeout: Option<u32>,","sourceCodeStart":1978,"sourceCodeEnd":2014,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs#L1978-L2014","documentation":"queue_add enqueues new work items and must execute on the metastore node where the authoritative queue tables live. On a worker node CacheStore stubs this method with a panic, so any enqueue attempt routed to a worker aborts the task with this message.","triggerScenarios":"Submitting a queue item (QueueAddPayload) — e.g. scheduling a pre-aggregation partition build — to a CubeStore worker instead of the metastore node.","commonSituations":"App servers configured with the address of a CubeStore worker rather than the metastore; Kubernetes service selecting all CubeStore pods instead of only the metastore pod.","solutions":["Point queue producers at the metastore node's address.","Fix service discovery/selector so only the metastore pod receives queue API traffic.","If running workers+metastore separately, ensure the client uses the metastore port.","Check cube store logs to confirm which node role received the request."],"exampleFix":"// before: K8s service selects all cubestore pods\nqueueTarget = 'cubestore-service:3030';\n// after: dedicated service for metastore only\nqueueTarget = 'cubestore-metastore:3030';","handlingStrategy":"validation","validationCode":"if !is_metastore(store.node()) {\n    return Err(CubeError::internal(\"queue_add requires the metastore node\"));\n}\nlet resp = store.queueAdd(payload).await?;","typeGuard":"fn is_metastore(node: &CubeStoreNode) -> bool {\n    matches!(node.role(), NodeRole::Metastore)\n}","tryCatchPattern":null,"preventionTips":["Configure producers with the metastore address explicitly.","In Kubernetes, use a service selecting only the metastore pod.","Log the resolved queue endpoint at client startup."],"tags":["cubestore","rust","topology","queue"],"backgroundTag":"wrong-node-role","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}