risingwavelabs/risingwave · error · ArrayError
Pb decode error: {0}
Error message
Pb decode error: {0} What it means
ArrayError::PbDecode wraps a prost::DecodeError that occurred while decoding a protobuf-encoded array. It is raised when binary data expected to deserialize into an array's protobuf representation is malformed or a schema version mismatch makes the bytes undecodable.
Source
Thrown at src/common/src/array/error.rs:26
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use std::convert::Infallible;
pub use anyhow::anyhow;
use risingwave_pb::PbFieldNotFound;
use thiserror::Error;
use thiserror_ext::Construct;
use crate::error::BoxedError;
#[derive(Error, Debug, Construct)]
pub enum ArrayError {
#[error("Pb decode error: {0}")]
PbDecode(#[from] prost::DecodeError),
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error(transparent)]
Internal(
#[from]
#[backtrace]
anyhow::Error,
),
#[error("Convert from arrow error: {0}")]
FromArrow(
#[source]
#[backtrace]
BoxedError,
),View on GitHub (pinned to 6469eb736d)
Solutions
- Identify the source of the bytes (usually Hummock storage or network serialization) and check for corruption
- Ensure all cluster nodes run the same RisingWave version so proto schemas match
- Replay/recover from a clean checkpoint if data corruption is confirmed
Defensive patterns
Strategy: try-catch
Validate before calling
// Sanity-check the payload before decode
if bytes.is_empty() || bytes.len() > MAX_ARRAY_BYTES { return Err("invalid array payload".into()); } Try / catch
match result {
Err(ArrayError::PbDecode(e)) => {
log::error!("protobuf array decode failed: {e}; check version/corruption");
// recover from checkpoint or skip bad batch
}
other => other,
} Prevention
- Keep all cluster nodes on the same RisingWave version
- Checksum-verify serialized payloads in transit and storage
- Recover from clean checkpoints when corruption is detected
When it happens
Trigger: Any code path that converts a prost message into an array (e.g. prost value conversion via TryFrom with #[from] prost::DecodeError) receiving corrupt/truncated bytes or an incompatible proto definition.
Common situations: Corrupted data in a checkpoint/snapshot; reading data written by a newer RW version with changed proto schema; feeding wrong byte buffers into array deserialization.
Understand the failure class
Background: "cannot parse invalid wire-format data", "cannot unmarshal", "failed unmarshalling": protobuf unmarshal errors explained — this error's family across 10 libraries.
Related errors
- DecodeError {error}
- Decoding error: {0}
- Failed to decode prost: field not found `{}`
- query_epoch not set in distributed lookup join
- unspecified AsOf join inequality type
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/5a39fcae64d7b23f.
Report an issue: GitHub.