mobile: Remove Executor from EnvoyHTTPCallbacks API #32776
Mobile/Android tests (success)
Check has finished
Details
Check run finished (success ✔️)
The check run can be viewed here:
Mobile/Android tests (pr/32776/main@18b9a44)
Check started by
Request (pr/32776/main@18b9a44)
@fredyw 18b9a44
#32776 merge
main@a3406aa
mobile: Remove Executor from Java & Kotlin API
This PR removes running the callbacks with the
Executor
in the API. Although, it makes sense to run the certain callbacks with theExecutor
, especially for blocking I/O so that we don't block the Envoy thread, having the API that forces the use ofExecutor
is bad because we will always need to copy theByteBuffer
before running it with theExecutor
or else we may run into accessing afree
-edByteBuffer
. This change is essentially making the use of theExecutor
for the callbacks a user choice. Both theEnvoyHTTPCallbacks
andEnvoyHTTPFilter
interfaces have been updated with the comments related to usingByteBuffer data
. The change also makes the Java/Kotlin API consistent with the other language APIs.The PR is also a follow-up to #32715 to reduce the number of copies, especially for item 5 in the after section. With this change, there is only one copy from
Envoy::Buffer::Instance
toenvoy_data
.For Cronvoy, there is no substantial change because the
CronvoyUrlRequest#onData
already makes a copy of theByteBuffer
passed from the callback before passing it into a separate thread. The only change is to make a copy earlier prior to spawning a thread.Risk Level: high
Testing: CI
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: mobile
Environment
Request variables
Key | Value |
---|---|
ref | f020c18516fa28906f1b59c62e90a2be3e3a5fe7 |
sha | 18b9a44 |
pr | 32776 |
base-sha | a3406aa |
actor | @fredyw |
message | mobile: Remove Executor from Java & Kotlin API... |
started | 1709849147.339477 |
target-branch | main |
trusted | false |
Build image
Container image/s (as used in this CI run)
Key | Value |
---|---|
default | envoyproxy/envoy-build-ubuntu:0ca52447572ee105a4730da5e76fe47c9c5a7c64 |
mobile | envoyproxy/envoy-build-ubuntu:mobile-0ca52447572ee105a4730da5e76fe47c9c5a7c64 |
Version
Envoy version (as used in this CI run)
Key | Value |
---|---|
major | 1 |
minor | 30 |
patch | 0 |
dev | true |