Repository navigation
wasm: fix sending initial metadata in gRPC callouts. - #16502
Conversation
Signed-off-by: Piotr Sikora <[email protected]>
|
Tests broken due to a memory leak in the C++ SDK. Fixed in proxy-wasm/proxy-wasm-cpp-sdk#114, I will update this PR once it's merged there. |
|
@PiotrSikora https://github.com/envoyproxy/envoy/pull/16502/files#diff-c386f59113c79157fdc6b88ce0c4c14e307509bd7038ce816821985293d55410L1127-R1127 I think that this extra copy is not avoidable. But it will be pretty heavy to be copied per gRPC callout. What do you think about this? |
Note that only the gRPC initial metadata is copied (added) to the existing HTTP headers, so it should be relatively lightwieght. But no, I don't see a way to avoid the extra copy using existing APIs. @mattklein123 any ideas? |
|
This is just my sight and may have wrong idea. But also, I think that we will face |
Signed-off-by: Piotr Sikora <[email protected]>
|
OK, the C++ SDK was updated to a version with the memory leak fixed, so this should be good to go. |
|
/lgtm deps |
I'm not sure I follow. Could you please elaborate on which copies do you think could be avoided? The reason why |
|
@PiotrSikora This is just a concept. But |
Initial/trailing gRPC metadata are really HTTP headers/trailers at the HTTP level, so that would only delay the copy, since they need to be merged with the "regular" HTTP headers/trailers at some point anyway. Also, considering that literally no one is using this feature (since it does't work prior to this PR), I'm going to say that it's a premature optimization, and not something we need to worry about just yet. |
Got it. Thank you! |
Signed-off-by: Piotr Sikora <[email protected]>
Signed-off-by: Piotr Sikora [email protected]