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

This commit is contained in:
J. Nick Koston
2025-12-08 10:37:51 -05:00
committed by GitHub
parent d635892ecf
commit 801d1135ab
9 changed files with 27 additions and 24 deletions
+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;
}