[select] Add zero-copy support for API select commands (#12329)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2025-12-08 10:37:51 -05:00
1 parent d635892ecf
commit 801d1135ab
9 files changed
+27 -24

No files matched your search

+5 -2
View File
@@ -1569,9 +1569,12 @@ bool SelectCommandRequest::decode_varint(uint32_t field_id, ProtoVarInt value) {
}
bool SelectCommandRequest::decode_length(uint32_t field_id, ProtoLengthDelimited value) {
switch (field_id) {
case 2:
this->state = value.as_string();
case 2: {
// Use raw data directly to avoid allocation
this->state = value.data();
this->state_len = value.size();
break;
}
default:
return false;
}