{"record":{"id":"5e1a60f67ed81a1a","repo":"cube-js/cube","slug":"cachestore-cannot-be-used-on-the-worker-node-queu-5e1a60","errorCode":null,"errorMessage":"CacheStore cannot be used on the worker node! queue_result was used.","messagePattern":"CacheStore cannot be used on the worker node! queue_result was used\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs","lineNumber":2060,"sourceCode":"    async fn queue_retrieve_by_path(\n        &self,\n        _path: String,\n        _allow_concurrency: u32,\n        _caller_process_id: Option<String>,\n    ) -> Result<QueueRetrieveResponse, CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! queue_retrieve_by_path was used.\")\n    }\n\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","sourceCodeStart":2042,"sourceCodeEnd":2078,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs#L2042-L2078","documentation":"CubeStore worker nodes implement CacheStore::queue_result as an unconditional panic! stub, because polling a queue's result is only meaningful on the node that owns the queue (the master). This error means queue_result was called on a cache-only worker store.","triggerScenarios":"Calling CacheStore::queue_result(key, external_id) on a worker-node CacheStore instance (cache_rocksstore.rs:2060).","commonSituations":"A process running in worker mode tries to fetch queue results locally; orchestration code accidentally holds a reference to the worker cache store instead of a remote client to the master.","solutions":["Fetch queue results from the master node via the remote store client","Confirm node role configuration: worker nodes must not run result-polling paths","In tests, use the full RocksDB cache store implementation rather than the worker-mode stub"],"exampleFix":"// before\nlet r = worker_store.queue_result(key, external_id).await?;\n// after\nlet r = master_client.queue_result(key, external_id).await?;","handlingStrategy":"validation","validationCode":"if !is_master { return Err(CubeError::internal(\"queue_result requires master node\")); }\nlet r = master_client.queue_result(key, external_id).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(key, external_id))).map_err(|_| CubeError::internal(\"queue_result called on worker node\"))?;","preventionTips":["Poll queue results only from the master node","Configure orchestration loops to target the master endpoint","Log node role on panic to speed triage","Separate master/worker binaries so master-only APIs are unreachable on workers"],"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"}