cube-js/cube · error
CacheStore cannot be used on the worker node! healthcheck wa
Error message
CacheStore cannot be used on the worker node! healthcheck was used.
What it means
CacheStore::healthcheck on worker nodes is an unconditional panic! stub (cache_rocksstore.rs:2092), so even a health probe routed to the worker cache store crashes with this message. It exists purely as a guard: these CacheStore operations must never be called in worker mode.
Source
Thrown at rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs:2092
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.")
}
async fn wipe(&self) -> Result<(), CubeError> {
panic!("CacheStore cannot be used on the worker node! wipe was used.")
}
}
crate::di_service!(ClusterCacheStoreClient, [CacheStore]);
#[cfg(test)]
mod tests {
use super::*;
use crate::cachestore::{CacheEvictionPolicy, EvictionFinishedResult};
use crate::config::{init_test_logger, ConfigObjImpl, CubeServices};View on GitHub (pinned to 7d981676b3)
Solutions
- Point health checks at the master node's store/endpoint
- Use a worker-appropriate health probe instead of CacheStore::healthcheck
- Complete role detection before installing health-check loops
Example fix
// before
// probe on all nodes
store.healthcheck().await?;
// after
if is_master { store.healthcheck().await?; } else { worker_healthcheck().await?; } Defensive patterns
Strategy: fallback
Validate before calling
if is_master { store.healthcheck().await?; } else { worker_probe().await?; } Type guard
fn health_probe_available(store: &dyn CacheStore) -> bool { node_role == NodeRole::Master } Try / catch
let ok = std::panic::catch_unwind(AssertUnwindSafe(|| store.healthcheck())).map(|r| r.is_ok()).unwrap_or(false);
Prevention
- Use worker-appropriate health endpoints for workers
- Never probe CacheStore::healthcheck on non-master nodes
- Configure load balancers with role-specific health paths
- Complete role detection before health loops start
When it happens
Trigger: Calling CacheStore::healthcheck() on a worker-node CacheStore (cache_rocksstore.rs:2092), typically from a health-check loop or load-balancer probe wired to the wrong endpoint.
Common situations: Load balancers/health probes targeting worker nodes with a master-only health endpoint; startup code that probes the store before role detection completes.
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/c4056cc6a6f1b312.
Report an issue: GitHub.