{"record":{"id":"8f7df7b8efaf9633","repo":"risingwavelabs/risingwave","slug":"decoded-epoch-not-match-expected-epoch","errorCode":null,"errorMessage":"decoded epoch {} not match expected epoch {}","messagePattern":"decoded epoch (.+?) not match expected epoch (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/stream/src/common/log_store_impl/kv_log_store/serde.rs","lineNumber":463,"sourceCode":"        let size_bound = (end_seq_id - start_seq_id + 1) as usize;\n        let mut data_chunk_builder =\n            DataChunkBuilder::new(self.payload_schema.clone(), size_bound + 1);\n        let mut ops = Vec::with_capacity(size_bound);\n        let mut read_info = ReadInfo::new();\n        let stream = select_all(\n            iters\n                .into_iter()\n                .map(|(vnode, iter)| deserialize_stream(vnode, iter, self.clone())),\n        );\n        pin_mut!(stream);\n        while let Some(row) = stream.try_next().await? {\n            let epoch = row.row_meta.epoch;\n            let op = row.op;\n            let row_size = row.row_meta.size;\n            match (epoch, op) {\n                (epoch, LogStoreOp::Row { op, row, .. }) => {\n                    if epoch != expected_epoch {\n                        return Err(anyhow!(\n                            \"decoded epoch {} not match expected epoch {}\",\n                            epoch,\n                            expected_epoch\n                        ));\n                    }\n                    read_info.read_one_row(row_size);\n                    ops.push(op);\n                    if ops.len() > size_bound {\n                        return Err(anyhow!(\n                            \"row count {} exceed size bound {}\",\n                            ops.len(),\n                            size_bound\n                        ));\n                    }\n                    assert!(data_chunk_builder.append_one_row(row).is_none());\n                }\n                (\n                    epoch,","sourceCodeStart":445,"sourceCodeEnd":481,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/stream/src/common/log_store_impl/kv_log_store/serde.rs#L445-L481","documentation":"Guard in deserialize_stream_chunk of the KV log store: a decoded row's epoch differs from the epoch expected for the range being decoded. The state-table iteration returned data from the wrong epoch, indicating a corrupt or inconsistent read range; decoding aborts with this error.","triggerScenarios":"Thrown at src/stream/src/common/log_store_impl/kv_log_store/serde.rs:463 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["This indicates corruption or misalignment in the KV log store: a decoded row's epoch differs from the epoch being read.","Verify the state store data integrity for the affected vnode range; re-plan or rebuild the actor so it re-reads from a consistent snapshot.","If reproducible, report with the expected/decoded epochs from the message."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}