You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error message seems to be wrong. Looking at the code this seems to occur when there's not enough bytes in the buffer (similar to UnexpectedEOF).
The docs states to support a maximum set of features of serde, but I couldn't find the list of actual supported features.
The code that probably fails is deserializing a Vec<Span>. The datastructures are simple, but there's some custom serde code which I don't know, if it's supported or not.
#[derive(Debug,Clone,Serialize,Deserialize)]pubstructSpan{pubtrace_id:TraceId,#[serde(with = "serde_datetime")]pubspan_timestamp:DateTime,}mod serde_datetime {use serde::{Deserialize,Deserializer,Serializer};use tantivy::DateTime;pub(crate)fnserialize<S>(datetime:&DateTime,serializer:S) -> Result<S::Ok,S::Error>whereS:Serializer{
serializer.serialize_i64(datetime.into_timestamp_nanos())}pub(crate)fndeserialize<'de,D>(deserializer:D) -> Result<DateTime,D::Error>whereD:Deserializer<'de>{let datetime_i64:i64 = Deserialize::deserialize(deserializer)?;Ok(DateTime::from_timestamp_nanos(datetime_i64))}}#[derive(Debug,Clone,Copy,Eq,PartialEq,Ord,PartialOrd,Hash)]pubstructTraceId([u8;16]);implSerializeforTraceId{fnserialize<S:Serializer>(&self,serializer:S) -> Result<S::Ok,S::Error>{let b64trace_id = BASE64_STANDARD.encode(self.0);
serializer.serialize_str(&b64trace_id)}}impl<'de>Deserialize<'de>forTraceId{fndeserialize<D>(deserializer:D) -> Result<Self,D::Error>whereD:Deserializer<'de>{let b64trace_id = String::deserialize(deserializer)?;if b64trace_id.len() != TraceId::BASE64_LENGTH{let message = format!("base64 trace ID must be {} bytes long, got {}",
TraceId::BASE64_LENGTH,
b64trace_id.len());returnErr(de::Error::custom(message));}letmut trace_id = [0u8;16];BASE64_STANDARD// Using the unchecked version here because otherwise the engine gets the wrong size// estimate and fails..decode_slice_unchecked(b64trace_id.as_bytes(),&mut trace_id).map_err(|error| {let message = format!("failed to decode base64 trace ID: {:?}", error);
de::Error::custom(message)})?;Ok(TraceId(trace_id))}}
The text was updated successfully, but these errors were encountered:
As reported by a user here: quickwit-oss/quickwit#3975
Currently we don't have something to reproduce.
The error message seems to be wrong. Looking at the code this seems to occur when there's not enough bytes in the buffer (similar to UnexpectedEOF).
The docs states to support a maximum set of features of serde, but I couldn't find the list of actual supported features.
The code that probably fails is deserializing a
Vec<Span>
. The datastructures are simple, but there's some custom serde code which I don't know, if it's supported or not.The text was updated successfully, but these errors were encountered: