{"record":{"id":"7f92e55f56eb8f6b","repo":"cube-js/cube","slug":"cachestore-cannot-be-used-on-the-worker-node-queu-7f92e5","errorCode":null,"errorMessage":"CacheStore cannot be used on the worker node! queue_get was used.","messagePattern":"CacheStore cannot be used on the worker node! queue_get was used\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs","lineNumber":2031,"sourceCode":"        _orphaned_timeout: Option<u32>,\n        _heartbeat_timeout: Option<u32>,\n    ) -> Result<Vec<IdRow<QueueItem>>, CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! queue_to_cancel was used.\")\n    }\n\n    async fn queue_list(\n        &self,\n        _prefix: String,\n        _status_filter: Option<QueueItemStatus>,\n        _priority_sort: bool,\n        _with_payload: bool,\n        _caller_process_id: Option<String>,\n    ) -> Result<Vec<QueueListItem>, CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! queue_list was used.\")\n    }\n\n    async fn queue_get(&self, _key: QueueKey) -> Result<Option<QueueGetResponse>, CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! queue_get was used.\")\n    }\n\n    async fn queue_cancel(&self, _key: QueueKey) -> Result<Option<QueueCancelResponse>, CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! queue_cancel was used.\")\n    }\n\n    async fn queue_heartbeat(&self, _key: QueueKey) -> Result<(), CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! queue_heartbeat_by_id was used.\")\n    }\n\n    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    }","sourceCodeStart":2013,"sourceCodeEnd":2049,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs#L2013-L2049","documentation":"A hard guard panic inside the RocksDB-based CacheStore on a Cube Store worker node: queue_get was called on a store instance where the QueueStore trait methods are deliberately unimplemented, because queue state must live on the router node. The panic indicates an architectural misuse (worker performing a queue read) rather than corrupt data.","triggerScenarios":"Polling a queue item by QueueKey via queue_get against a worker node, e.g. a client checking build progress through the wrong endpoint.","commonSituations":"Clients storing a worker address after an initial partition upload and later polling queue status on it; misconfigured CUBEJS_DB/cubestore routing options sending status polls to workers.","solutions":["Send all queue status polling to the metastore node.","Reconfigure clients so the queue-get address equals the metastore address.","If the client cached endpoints, restart/reconfigure to re-resolve the metastore.","Confirm with logs that the panicking node is indeed a worker."],"exampleFix":"// before: polling worker for build status\nstatus = await workerClient.queueGet(key);\n// after\nstatus = await metastoreClient.queueGet(key);","handlingStrategy":"validation","validationCode":"if !is_metastore(client.node()) {\n    return Err(CubeError::internal(\"queue_get requires the metastore node\"));\n}\nlet resp = client.queueGet(key).await?;","typeGuard":"fn is_metastore(node: &CubeStoreNode) -> bool {\n    matches!(node.role(), NodeRole::Metastore)\n}","tryCatchPattern":null,"preventionTips":["Re-resolve endpoints on reconnect instead of caching worker addresses.","Keep status polling on the same client instance used for enqueue.","Check cubestore routing config when status polls fail."],"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"}