{"record":{"id":"df68d7ce39fc0aeb","repo":"cube-js/cube","slug":"cachestore-cannot-be-used-on-the-worker-node-queu-df68d7","errorCode":null,"errorMessage":"CacheStore cannot be used on the worker node! queue_result_blocking was used.","messagePattern":"CacheStore cannot be used on the worker node! queue_result_blocking was used\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs","lineNumber":2068,"sourceCode":"\n    async fn queue_ack(&self, _key: QueueKey, _result: Option<String>) -> Result<bool, CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! queue_ack was used.\")\n    }\n\n    async fn queue_result(\n        &self,\n        _key: QueueKey,\n        _external_id: Option<String>,\n    ) -> Result<Option<QueueResultResponse>, CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! queue_result was used.\")\n    }\n\n    async fn queue_result_blocking(\n        &self,\n        _key: QueueKey,\n        _timeout: u64,\n    ) -> Result<Option<QueueResultResponse>, CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! queue_result_blocking was used.\")\n    }\n\n    async fn queue_merge_extra(&self, _key: QueueKey, _payload: String) -> Result<(), CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! queue_merge_extra was used.\")\n    }\n\n    async fn compaction(&self) -> Result<(), CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! compaction was used.\")\n    }\n\n    async fn info(&self) -> Result<CachestoreInfo, CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! info was used.\")\n    }\n\n    async fn eviction(&self) -> Result<EvictionResult, CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! eviction was used.\")\n    }\n","sourceCodeStart":2050,"sourceCodeEnd":2086,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs#L2050-L2086","documentation":"CacheStore::queue_result_blocking (blocking wait for a queue result) is another panic! stub on worker nodes in cache_rocksstore.rs. A worker cannot block waiting on queue results since it does not own the queue, so any call panics with this message.","triggerScenarios":"Calling CacheStore::queue_result_blocking(key, timeout) on a worker-node store instance (cache_rocksstore.rs:2068).","commonSituations":"Blocking result wait executed inside a worker-mode CubeStore process; a deployment where the query-orchestration loop runs on workers instead of the master.","solutions":["Run the blocking result wait against the master node's store or a remote client to it","Fix node role assignment so queue-consuming/blocking code only runs on the master","If intentionally testing, instantiate the non-worker CacheStore variant"],"exampleFix":"// before\nlet r = worker_store.queue_result_blocking(key, timeout).await?;\n// after\nlet r = master_client.queue_result_blocking(key, timeout).await?;","handlingStrategy":"validation","validationCode":"if !is_master { return Err(CubeError::internal(\"blocking queue_result requires master node\")); }\nlet r = master_client.queue_result_blocking(key, timeout).await?;","typeGuard":"fn is_queue_capable(store: &dyn CacheStore) -> bool { node_role == NodeRole::Master }","tryCatchPattern":"let r = std::panic::catch_unwind(AssertUnwindSafe(|| master_client.queue_result_blocking(key, timeout))).map_err(|_| CubeError::internal(\"queue_result_blocking called on worker node\"))?;","preventionTips":["Run blocking waits on the master only","Never schedule blocking queue waits in worker processes","Verify role config after topology changes","Alert on any catch_unwind hit for this panic"],"tags":["cubestore","rust","panic","cache-store","worker-node","queue"],"backgroundTag":"cachestore-not-usable-on-worker","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}