cube-js/cube · error
CacheStore cannot be used on the worker node! info was used.
Error message
CacheStore cannot be used on the worker node! info was used.
What it means
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.
Source
Thrown at rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs:2080
async fn queue_result_blocking(
&self,
_key: QueueKey,
_timeout: u64,
) -> Result<Option<QueueResultResponse>, CubeError> {
panic!("CacheStore cannot be used on the worker node! queue_result_blocking was used.")
}
async fn queue_merge_extra(&self, _key: QueueKey, _payload: String) -> Result<(), CubeError> {
panic!("CacheStore cannot be used on the worker node! queue_merge_extra was used.")
}
async fn compaction(&self) -> Result<(), CubeError> {
panic!("CacheStore cannot be used on the worker node! compaction was used.")
}
async fn info(&self) -> Result<CachestoreInfo, CubeError> {
panic!("CacheStore cannot be used on the worker node! info was used.")
}
async fn eviction(&self) -> Result<EvictionResult, CubeError> {
panic!("CacheStore cannot be used on the worker node! eviction was used.")
}
async fn persist(&self) -> Result<(), CubeError> {
panic!("CacheStore cannot be used on the worker node! persist was used.")
}
async fn healthcheck(&self) -> Result<(), CubeError> {
panic!("CacheStore cannot be used on the worker node! healthcheck was used.")
}
async fn rocksdb_properties(&self) -> Result<Vec<RocksPropertyRow>, CubeError> {
panic!("CacheStore cannot be used on the worker node! rocksdb_properties was used.")
}
View on GitHub (pinned to 7d981676b3)
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
Example fix
// before let info = worker_store.info().await?; // after let info = master_client.info().await?;
Defensive patterns
Strategy: validation
Validate before calling
if !is_master { return Err(CubeError::internal("cache info is master-only")); }
let info = master_client.info().await?; Type guard
fn serves_info(store: &dyn CacheStore) -> bool { node_role == NodeRole::Master } Try / catch
let info = std::panic::catch_unwind(AssertUnwindSafe(|| master_client.info())).map_err(|_| CubeError::internal("info called on worker node"))?; Prevention
- Scrape cachestore metrics only from the master
- Configure dashboards with master endpoints
- Add role checks in stats collectors
- Document that info() panics on workers
When it happens
Trigger: Calling CacheStore::info() on a worker-node CacheStore instance (cache_rocksstore.rs:2080).
Common situations: Monitoring dashboards scraping cachestore info from all nodes including workers; dev/test setups running master-only APIs against a worker process.
Related errors
- CacheStore cannot be used on the worker node! queue_retrieve
- CacheStore cannot be used on the worker node! queue_ack was
- CacheStore cannot be used on the worker node! queue_result w
- CacheStore cannot be used on the worker node! queue_result_b
- CacheStore cannot be used on the worker node! queue_merge_ex
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/9612c6f50f59f2de.
Report an issue: GitHub.