{"record":{"id":"6aa30feb3ec50bf5","repo":"cube-js/cube","slug":"cachestore-cannot-be-used-on-the-worker-node-queu-6aa30f","errorCode":null,"errorMessage":"CacheStore cannot be used on the worker node! queue_merge_extra was used.","messagePattern":"CacheStore cannot be used on the worker node! queue_merge_extra was used\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs","lineNumber":2072,"sourceCode":"\n    async fn queue_result(\n        &self,\n        _key: QueueKey,\n        _external_id: Option<String>,\n    ) -> Result<Option<QueueResultResponse>, CubeError> {\n        panic!(\"CacheStore cannot be used on the worker node! queue_result was used.\")\n    }\n\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","sourceCodeStart":2054,"sourceCodeEnd":2090,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs#L2054-L2090","documentation":"CacheStore::queue_merge_extra merges extra payload into a queue entry; on worker nodes this is a deliberate panic! stub because workers have no queue storage. The panic signals an attempt to mutate queue state through a cache-only store.","triggerScenarios":"Calling CacheStore::queue_merge_extra(key, payload) on a worker-node CacheStore (cache_rocksstore.rs:2072).","commonSituations":"Queue bookkeeping code (e.g. attaching metadata to a running query queue entry) executing on a worker node; mixed-version cluster where a worker was handed queue duties.","solutions":["Route queue_merge_extra calls to the master node's store","Verify process role at startup and skip/refuse queue mutation paths on workers","Use a remote store client to the master instead of the local cache store"],"exampleFix":"// before\nworker_store.queue_merge_extra(key, payload).await?;\n// after\nmaster_client.queue_merge_extra(key, payload).await?;","handlingStrategy":"validation","validationCode":"if !is_master { return Err(CubeError::internal(\"queue_merge_extra requires master node\")); }\nmaster_client.queue_merge_extra(key, payload).await?;","typeGuard":"fn is_queue_capable(store: &dyn CacheStore) -> bool { node_role == NodeRole::Master }","tryCatchPattern":"std::panic::catch_unwind(AssertUnwindSafe(|| master_client.queue_merge_extra(key, payload))).map_err(|_| CubeError::internal(\"queue_merge_extra called on worker node\"))?;","preventionTips":["Mutate queue entries only via the master store","Audit shared code paths for unconditional queue mutation","Keep worker-mode builds free of queue trait usage","Test cluster topologies where nodes are started as workers"],"tags":["cubestore","rust","panic","cache-store","worker-node","queue"],"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"}