cube-js/cube · error

CacheStore cannot be used on the worker node! queue_list…

Error message

CacheStore cannot be used on the worker node! queue_list was used.

What it means

queue_list returns queue items with optional status filtering, priority sorting and payload inclusion; it reads metastore-owned queue tables. CacheStore panics on workers because they hold no queue data.

Solutions

  1. Point queue inspection tools at the metastore node.
  2. Restrict queue list APIs to the metastore in any proxy/load-balancer config.
  3. Verify node role via CubeStore status endpoints before querying queue state.
  4. Update client libraries to accept separate metastore vs store addresses.

Example fix

// before: monitor queries worker
monitor.connect('worker-0:3030').queueList(prefix);
// after
monitor.connect('metastore-0:3030').queueList(prefix);
Defensive patterns

Strategy: validation

Validate before calling

if !is_metastore(node) {
    return Err(CubeError::internal("queue_list requires the metastore node"));
}
let items = node.queueList(prefix, status, sort, with_payload, caller).await?;

Type guard

fn is_metastore(node: &CubeStoreNode) -> bool {
    matches!(node.role(), NodeRole::Metastore)
}

Prevention

When it happens

Trigger: Listing queue items (queue_list with prefix/status filter/priority_sort/with_payload/caller_process_id) against a CubeStore worker node.

Common situations: Monitoring UIs or CLI tools querying a worker address to view the queue; round-robin DNS balancing metastore API reads onto workers.

Related errors


AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02). Data as JSON: /api/errors/c294b54e1dcc8916. Report an issue: GitHub.

Appendix: source

Thrown at rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs:2027

    async fn queue_to_cancel(
        &self,
        _prefix: String,
        _orphaned_timeout: Option<u32>,
        _heartbeat_timeout: Option<u32>,
    ) -> Result<Vec<IdRow<QueueItem>>, CubeError> {
        panic!("CacheStore cannot be used on the worker node! queue_to_cancel was used.")
    }

    async fn queue_list(
        &self,
        _prefix: String,
        _status_filter: Option<QueueItemStatus>,
        _priority_sort: bool,
        _with_payload: bool,
        _caller_process_id: Option<String>,
    ) -> Result<Vec<QueueListItem>, CubeError> {
        panic!("CacheStore cannot be used on the worker node! queue_list was used.")
    }

    async fn queue_get(&self, _key: QueueKey) -> Result<Option<QueueGetResponse>, CubeError> {
        panic!("CacheStore cannot be used on the worker node! queue_get was used.")
    }

    async fn queue_cancel(&self, _key: QueueKey) -> Result<Option<QueueCancelResponse>, CubeError> {
        panic!("CacheStore cannot be used on the worker node! queue_cancel was used.")
    }

    async fn queue_heartbeat(&self, _key: QueueKey) -> Result<(), CubeError> {
        panic!("CacheStore cannot be used on the worker node! queue_heartbeat_by_id was used.")
    }

    async fn queue_retrieve_by_path(
        &self,
        _path: String,
        _allow_concurrency: u32,

View on GitHub (pinned to 7d981676b3)