{"record":{"id":"73a2339f280c4e4c","repo":"cube-js/cube","slug":"cachestore-cannot-be-used-on-the-worker-node-queu-73a233","errorCode":null,"errorMessage":"CacheStore cannot be used on the worker node! queue_clear was used.","messagePattern":"CacheStore cannot be used on the worker node! queue_clear was used\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs","lineNumber":2007,"sourceCode":"    }\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>,\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>,","sourceCodeStart":1989,"sourceCodeEnd":2025,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs#L1989-L2025","documentation":"A hard guard panic inside the RocksDB-based CacheStore on a Cube Store worker node: the queue_* methods of the QueueStore trait are intentionally unimplemented there because queue state must live on the router node. Seeing this panic means queue_clear was invoked against a store instance that is only meant to serve cached query results locally on a worker.","triggerScenarios":"Invoking queue_clear on a node whose backing store is CacheStore, e.g. an admin/maintenance endpoint bound to worker replicas.","commonSituations":"Ops scripts clearing stuck queues that hit the wrong node; admin dashboards connecting to a worker address; stale config after reassigning which node is the metastore.","solutions":["Issue queue_clear only against the metastore node.","Verify which node currently holds metastore role before running destructive queue maintenance.","Update ops scripts/dashboards with the metastore address.","Restart the cluster with the correct role assignment if the metastore moved."],"exampleFix":"// before: admin tool pointed at worker\nadminUrl = 'http://worker-1:3030/queue/clear';\n// after\nadminUrl = 'http://metastore-1:3030/queue/clear';","handlingStrategy":"validation","validationCode":"if !is_metastore(node) {\n    return Err(CubeError::internal(\"queue_clear requires the metastore node\"));\n}\nnode.queueClear().await?;","typeGuard":"fn is_metastore(node: &CubeStoreNode) -> bool {\n    matches!(node.role(), NodeRole::Metastore)\n}","tryCatchPattern":null,"preventionTips":["Double-check destructive queue maintenance targets before executing.","Update ops runbooks with the current metastore address after failover.","Require explicit confirmation of target node role in admin tools."],"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"}