cube-js/cube · error
CacheStore cannot be used on the worker node! queue_results_
Error message
CacheStore cannot be used on the worker node! queue_results_all was used.
What it means
CubeStore's CacheStore is the store implementation used on worker nodes, which only serve cache/partition data. The queue subsystem (pre-aggregation queue operations) must run on the metastore node, so CacheStore implements queue methods as unconditional panics. Calling queue_results_all on a worker node immediately panics with this message instead of returning a Result.
Source
Thrown at rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs:1988
}
async fn cache_keys(&self, _prefix: String) -> Result<Vec<IdRow<CacheItem>>, CubeError> {
panic!("CacheStore cannot be used on the worker node! cache_keys was used.")
}
async fn cache_incr(&self, _: String) -> Result<IdRow<CacheItem>, CubeError> {
panic!("CacheStore cannot be used on the worker node! cache_incr was used.")
}
async fn queue_all(&self, _limit: Option<usize>) -> Result<Vec<QueueAllItem>, CubeError> {
panic!("CacheStore cannot be used on the worker node! queue_all was used.")
}
async fn queue_results_all(
&self,
_limit: Option<usize>,
) -> Result<Vec<IdRow<QueueResult>>, CubeError> {
panic!("CacheStore cannot be used on the worker node! queue_results_all was used.")
}
async fn queue_results_multi_delete(&self, _ids: Vec<u64>) -> Result<(), CubeError> {
panic!("CacheStore cannot be used on the worker node! queue_results_multi_delete was used.")
}
async fn queue_add(&self, _payload: QueueAddPayload) -> Result<QueueAddResponse, CubeError> {
panic!("CacheStore cannot be used on the worker node! queue_add was used.")
}
async fn queue_add_and_retrieve(
&self,
_payload: QueueAddAndRetrievePayload,
) -> Result<QueueAddAndRetrieveResponse, CubeError> {
panic!("CacheStore cannot be used on the worker node! queue_add_and_retrieve was used.")
}
async fn queue_clear(&self) -> Result<(), CubeError> {View on GitHub (pinned to 7d981676b3)
Solutions
- Route queue operations to the metastore node (the node running the RocksDB metastore), not a cache/worker node.
- Check your CubeStore topology: only the node launched with metastore/leader responsibilities should serve queue APIs.
- If using cube store REST/metastore endpoints, update client config (host/port) to point at the metastore instance.
- If running all-in-one locally, ensure the process is started in a mode where queue APIs are backed by the real MetastoreRocksStore, not CacheStore.
Example fix
// before: queue management call sent to worker host
const store = cubeStoreClient('worker-host:3030');
await store.queueResultsAll();
// after: point at the metastore host
const store = cubeStoreClient('metastore-host:3030');
await store.queueResultsAll(); Defensive patterns
Strategy: validation
Validate before calling
// before calling queue APIs, verify the node is the metastore
async fn ensure_metastore(node: &CubeStoreNode) -> Result<(), CubeError> {
if node.role() != NodeRole::Metastore {
return Err(CubeError::internal("queue APIs require the metastore node"));
}
Ok(())
} Type guard
fn is_metastore(node: &CubeStoreNode) -> bool {
matches!(node.role(), NodeRole::Metastore)
} Prevention
- Keep separate connection configs for metastore vs worker nodes.
- Never send queue API traffic through load balancers that include workers.
- Confirm node role in startup logs before enabling queue features.
- In dev, run the all-in-one mode so CacheStore is never selected for queue calls.
When it happens
Trigger: A node configured as a CubeStore worker (not the metastore leader) receives or executes a call to queue_results_all — e.g. queue inspection/management code or query orchestration that fetches all queue results routed to the wrong node.
Common situations: Misconfigured cluster where a worker is mistakenly contacted for queue management (REST/metastore API calls pointed at a worker instead of the metastore node); custom tooling calling queue APIs against worker addresses; single-binary dev setup assumptions broken after splitting into worker/metastore roles.
Related errors
- CacheStore cannot be used on the worker node! queue_results_
- CacheStore cannot be used on the worker node! queue_add was
- CacheStore cannot be used on the worker node! queue_add_and_
- CacheStore cannot be used on the worker node! queue_clear wa
- CacheStore cannot be used on the worker node! queue_to_cance
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/5367a6ed879a9288.
Report an issue: GitHub.