{"record":{"id":"d35cdfb22a5e48fe","repo":"risingwavelabs/risingwave","slug":"mismatch-initial-vnode-bitmap-expect","errorCode":null,"errorMessage":"mismatch initial vnode bitmap: {:?}, expect: {:?}","messagePattern":"mismatch initial vnode bitmap: (.+?), expect: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/stream/src/executor/backfill/snapshot_backfill/consume_upstream/upstream_table_trait.rs","lineNumber":121,"sourceCode":"        vnode: VirtualNode,\n        epoch: u64,\n        start_pk: Option<OwnedRow>,\n    ) -> StreamExecutorResult<Self::ChangeLogStream> {\n        let stream = self\n            .batch_iter_vnode_log(\n                epoch,\n                HummockReadEpoch::Committed(epoch),\n                start_pk.as_ref(),\n                vnode,\n            )\n            .await?;\n        Ok(stream.map_err(Into::into))\n    }\n\n    fn check_initial_vnode_bitmap(&self, vnodes: &Bitmap) -> StreamExecutorResult<()> {\n        let expected_vnodes = &**self.vnodes();\n        if expected_vnodes != vnodes {\n            Err(anyhow!(\n                \"mismatch initial vnode bitmap: {:?}, expect: {:?}\",\n                vnodes,\n                self.vnodes()\n            )\n            .into())\n        } else {\n            Ok(())\n        }\n    }\n\n    fn update_vnode_bitmap(&mut self, new_vnodes: Arc<Bitmap>) {\n        let _ = self.update_vnode_bitmap(new_vnodes);\n    }\n}\n","sourceCodeStart":103,"sourceCodeEnd":136,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/stream/src/executor/backfill/snapshot_backfill/consume_upstream/upstream_table_trait.rs#L103-L136","documentation":"check_initial_vnode_bitmap verifies that the vnode bitmap announced by the upstream at the start of backfill matches what this backfill actor computed for itself. A mismatch means distribution changed between planning and execution, so parallel backfill would read/assign wrong key ranges.","triggerScenarios":"The upstream table's vnode bitmap differs from the backfill executor's own vnodes at actor startup, typically after a scale-in/out or fragment rescheduling between job creation and actor start, or a bug in fragment distribution of a parallelized job.","commonSituations":"Rescaling a cluster while a backfill job is being created/recovered; inconsistent parallelism settings between upstream and backfill fragments; meta bug in fragment mapping after failover.","solutions":["Retry the job recovery/rescheduling so the actor is rebuilt with the current upstream distribution","Cancel and recreate the MV/backfill job so planning and execution see the same distribution","Avoid scaling the cluster while backfill jobs are being created; rescale after backfill completes","If reproducible, file a bug with the fragment and actor IDs from the error"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if let Err(e) = executor.check_initial_vnode_bitmap(&vnodes) {\n    // treat as transient scheduling mismatch: recreate/recover the actor\n    // if persistent, cancel and recreate the MV\n}","preventionTips":["Avoid rescaling the cluster while backfill jobs are being created","Verify upstream and backfill fragments get consistent parallelism settings"],"tags":["rust","streaming","backfill","vnode","distribution"],"backgroundTag":"internal-invariant-violation","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}