{"record":{"id":"555e06f5f9270fb1","repo":"risingwavelabs/risingwave","slug":"only-support-glue-header-version-3-but-found","errorCode":null,"errorMessage":"Only support glue header version 3 but found {}","messagePattern":"Only support glue header version 3 but found (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/connector/src/parser/avro/parser.rs","lineNumber":132,"sourceCode":"                // FIXME: we should not use `Reader` (file header) here. See comment above and https://github.com/risingwavelabs/risingwave/issues/12871\n                let mut reader = Reader::with_schema(&self.schema.original_schema, payload)?;\n                match reader.next() {\n                    Some(Ok(v)) => Ok(Some(v)),\n                    Some(Err(e)) => Err(e)?,\n                    None => bail!(\"avro parse unexpected eof\"),\n                }\n            }\n            WriterSchemaCache::Glue(resolver) => {\n                // <https://github.com/awslabs/aws-glue-schema-registry/blob/v1.1.20/common/src/main/java/com/amazonaws/services/schemaregistry/utils/AWSSchemaRegistryConstants.java#L59-L61>\n                // byte 0:      header version = 3\n                // byte 1:      compression: 0 = no compression; 5 = zlib (unsupported)\n                // byte 2..=17: 16-byte UUID as schema version id\n                // byte 18..:   raw avro payload\n                if payload.len() < 18 {\n                    bail!(\"payload shorter than 18-byte glue header\");\n                }\n                if payload[0] != 3 {\n                    bail!(\n                        \"Only support glue header version 3 but found {}\",\n                        payload[0]\n                    );\n                }\n                if payload[1] != 0 {\n                    bail!(\"Non-zero compression {} not supported\", payload[1]);\n                }\n                let schema_version_id = uuid::Uuid::from_slice(&payload[2..18]).unwrap();\n                let writer_schema = resolver.get_by_id(schema_version_id).await?;\n                let mut raw_payload = &payload[18..];\n                Ok(Some(from_avro_datum(\n                    writer_schema.as_ref(),\n                    &mut raw_payload,\n                    Some(&self.schema.original_schema),\n                )?))\n            }\n        }\n    }","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/parser/avro/parser.rs#L114-L150","documentation":"For Glue Schema Registry Avro payloads, byte 0 of the 18-byte header must be version 3. If the first byte is anything else, the parser bails with this message showing the found value, indicating the payload is not a v3 Glue-framed Avro message.","triggerScenarios":"A Glue-configured Avro source receives a message whose first byte != 3 — i.e. messages serialized with a different framing (Confluent wire format magic byte 0, or another Glue header version).","commonSituations":"Mixing Confluent Schema Registry producers with a Glue-configured RW source; Glue SDK upgrades changing header versions; sending raw Avro binary without any registry framing.","solutions":["Ensure all producers use the Glue Schema Registry serializer (header version 3)","Change the RW source's schema-registry config to Confluent if producers use Confluent framing","Inspect message bytes: byte0=0x03 and byte1=0x00 are required (version 3, no compression)"],"exampleFix":"// before\n// source uses glue, producer uses Confluent wire format (magic byte 0)\n// after\n// set producer serializer to GlueSchemaRegistryAvroSerializer, or set RW source to schema-registry='confluent'","handlingStrategy":"validation","validationCode":"function checkGlueVersion(buf) {\n  if (buf && buf.length >= 18 && buf[0] !== 3) {\n    throw new Error(`glue header version must be 3, got ${buf[0]}; check producer serializer`);\n  }\n}","typeGuard":"function isGlueV3(buf) {\n  return buf instanceof Uint8Array && buf.length >= 18 && buf[0] === 3;\n}","tryCatchPattern":"match parse_result {\n  Err(e) if e.to_string().starts_with(\"Only support glue header version 3\") => {\n    error!(\"framing mismatch: producer likely Confluent or other registry\");\n  }\n  other => other?,\n}","preventionTips":["Standardize on Glue Schema Registry v3 framing across producers","Never mix Confluent-framed topics with Glue-configured RW sources","Dump the first two payload bytes to verify version/compression when debugging"],"tags":["avro","glue","schema-registry","header-version"],"backgroundTag":"unexpected-response-shape","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"}