{"record":{"id":"9612c6f50f59f2de","repo":"cube-js/cube","slug":"cachestore-cannot-be-used-on-the-worker-node-info","errorCode":null,"errorMessage":"CacheStore cannot be used on the worker node! info was used.","messagePattern":"CacheStore cannot be used on the worker node! info was used\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs","lineNumber":2080,"sourceCode":"\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\n    async fn persist(&self) -> Result<(), CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! persist was used.\")\n    }\n\n    async fn healthcheck(&self) -> Result<(), CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! healthcheck was used.\")\n    }\n\n    async fn rocksdb_properties(&self) -> Result<Vec<RocksPropertyRow>, CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! rocksdb_properties was used.\")\n    }\n","sourceCodeStart":2062,"sourceCodeEnd":2098,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs#L2062-L2098","documentation":"CacheStore::info returns cachestore statistics; on worker nodes it is implemented as a panic! stub (cache_rocksstore.rs:2080) because cache info is served by the master. Calling it on a worker means stats/admin traffic was pointed at a node that cannot answer it.","triggerScenarios":"Calling CacheStore::info() on a worker-node CacheStore instance (cache_rocksstore.rs:2080).","commonSituations":"Monitoring dashboards scraping cachestore info from all nodes including workers; dev/test setups running master-only APIs against a worker process.","solutions":["Query cachestore info from the master node only","Update monitoring/scraping configs to target the master endpoint","Guard the info-collection code path with a node-role check"],"exampleFix":"// before\nlet info = worker_store.info().await?;\n// after\nlet info = master_client.info().await?;","handlingStrategy":"validation","validationCode":"if !is_master { return Err(CubeError::internal(\"cache info is master-only\")); }\nlet info = master_client.info().await?;","typeGuard":"fn serves_info(store: &dyn CacheStore) -> bool { node_role == NodeRole::Master }","tryCatchPattern":"let info = std::panic::catch_unwind(AssertUnwindSafe(|| master_client.info())).map_err(|_| CubeError::internal(\"info called on worker node\"))?;","preventionTips":["Scrape cachestore metrics only from the master","Configure dashboards with master endpoints","Add role checks in stats collectors","Document that info() panics on workers"],"tags":["cubestore","rust","panic","cache-store","worker-node","info"],"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"}