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
As we discussed in quickwit-oss/quickwit#2834, we need to store more than a record's content in payload. In case we want to store a command like this:
enum Command<'a> {
Ingest {
json_payload: &'a [u8]
},
Commit,
// ... more to come?
}
we will need to write a command type followed by json_payload. Having &[u8] in the interface doesn't allow us to write two chunks of data efficiently. However, if we switch interface to use bytes::Buf it will allows us to continue using &[u8] thanks to impl Buf for &[u8] and at the same time be able to provide access to command code and payload without copying thanks to Buf's support for chaining.
The text was updated successfully, but these errors were encountered:
As we discussed in quickwit-oss/quickwit#2834, we need to store more than a record's content in payload. In case we want to store a command like this:
we will need to write a command type followed by
json_payload
. Having&[u8]
in the interface doesn't allow us to write two chunks of data efficiently. However, if we switch interface to usebytes::Buf
it will allows us to continue using&[u8]
thanks toimpl Buf for &[u8]
and at the same time be able to provide access to command code and payload without copying thanks to Buf's support for chaining.The text was updated successfully, but these errors were encountered: