[ 
https://issues.apache.org/jira/browse/THRIFT-6263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jens Geyer resolved THRIFT-6263.
--------------------------------
    Fix Version/s: 0.25.0
         Assignee: Jens Geyer
       Resolution: Fixed

> Go: TZlibTransportFactory has no constructor that takes a TConfiguration
> ------------------------------------------------------------------------
>
>                 Key: THRIFT-6263
>                 URL: https://issues.apache.org/jira/browse/THRIFT-6263
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Go - Library
>            Reporter: Jens Geyer
>            Assignee: Jens Geyer
>            Priority: Minor
>             Fix For: 0.25.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The Go transport factories that can carry a configuration all offer a 
> {{...Conf}} constructor:
> * {{NewTFramedTransportFactoryConf(factory TTransportFactory, conf 
> *TConfiguration)}}
> * {{NewTHeaderTransportFactoryConf(factory TTransportFactory, conf 
> *TConfiguration)}}
> {{lib/go/thrift/zlib_transport.go}} does not:
> * {{NewTZlibTransportFactory(level int)}} ({{:59}})
> * {{NewTZlibTransportFactoryWithFactory(level int, factory 
> TTransportFactory)}} ({{:65}})
> A caller that builds its transport stack from configured factories therefore 
> has to treat zlib as a special case. In the documented pipeline the 
> configuration reaches the wrapped transport anyway, so this is a consistency 
> gap rather than a defect -- but it is the kind of gap that makes callers 
> write code that only looks right.
> h2. Suggested
> Add {{NewTZlibTransportFactoryConf(level int, factory TTransportFactory, conf 
> *TConfiguration)}} alongside the existing two, following the framed and 
> header factories, and have it propagate the configuration in 
> {{GetTransport()}}.
> _Drafted with AI assistance (Claude Opus 5); reviewed and filed by Jens 
> Geyer._



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to