trinodb / trino-gateway

https://trinodb.github.io/trino-gateway/
Apache License 2.0
122 stars 47 forks source link

Add proxytarget header to query requests #384

Closed andythsu closed 2 weeks ago

andythsu commented 2 weeks ago

Description

Add proxytarget header to requests where previousBackend is found. Otherwise this line will return warning https://github.com/trinodb/trino-gateway/blob/d45c64f516062841339e9ce93e4675257e6e93e8/gateway-ha/src/main/java/io/trino/gateway/ha/handler/QueryIdCachingProxyHandler.java#L154-L174

Additional context and related issues

Release notes

( ) This is not user-visible or is docs only, and no release notes are required. ( ) Release notes are required. Please propose a release note for me. ( ) Release notes are required, with the following suggested text:

* 
wendigo commented 2 weeks ago

@willmostly do you want to take a look?

oneonestar commented 2 weeks ago

Actually PROXY_TARGET_HEADER will be gone after migrate to Airlift. The header was needed because we were hooking into different execution phases in jetty proxy. We used the header to pass information between these hooks. So that's kind of a hacky way to persist information and it'll be gone.