Kitex Release v0.4.3

Introduction to Key Changes


  1. Extend the Generated Code of client/server: Add a new feature which can extend generated client.go/server.go with config file. It is applicable to the scenario for customizing the unified suite. See Extend the Templates of Service Generated Code for details.
  2. Biz Customized Exception : Add supporting to return customized biz error which can distinguish with RPC error. See Business Exception, Proposal.
  3. Request Profiler : Add a new feature to do profiler for requests which can be used for cost statistics.
  4. Context Middleware : Add Context Middleware which is used for adding request-level middlewares.


  1. Frugal Performance Optimization : Support frugal precompile (pretouch) when new client or server, which is to reduce the impact of dynamic compilation on latency.
  2. Connpool Optimiztion : Refactor connection pool to improve the idle connections cleanup.

Full Release Log


  • [#691] feat(client): add context middleware which is used for adding request-level middlewares.
  • [#649] feat(connpool): new long connection pool with minIdle config and idle connections cleanup.
  • [#672] feat(grpc): add kitex grpc metadata api to get header, tailer, and peer address metadata.
  • [#613] feat(exception): support customized biz error which can distinguish with RPC error.
  • [#670] feat(exception): support error format.
  • [#678] feat(tool): add git and record param for cmd.
  • [#662] feat(tool): support frugal precompile (pretouch) when new client or server.
  • [#657] feat(tool): support template extension.
  • [#527] feat(profiler): profiler for rpc request which can be used for cost statistics.


  • [#690] optimize(meta): remove error logic for adding default metaHandler in #503.
  • [#638] optimize(generic): httppb generic support map/list elem type as struct.
  • [#641] optimize(tool): add warnings comments for oneway methods.


  • [#611] fix(client): fix resource leaks caused by Finalizer not being triggered in the scenario where clients are created frequently.
  • [#698] fix(connpool): adjust globalIdle based on the number of connections decreased during the Get.
  • [#636] fix(connpool): CloseCallback and statistical reporting of connection pool are invalid when the connection pool is reset in ForwardProxy.
  • [#647] fix(grpc): update grpc connection window size when initial and synchronize grpc pr #5459.
  • [#639] fix(generic): marshalling list in generic and enabling forJSON reader option for MapThriftGeneric.
  • [#655] fix(generic): numeric constant parsing fails when used as generic default value.
  • [#654] fix(frugal): fix compilation error when using lower go version.
  • [#682] fix(profiler): profiler stops pprof profile.
  • [#637] fix(tool): fix imports in handler.go template.
  • [#630] fix(tool): remove redundant kitex comments for file that do not declare an interface.
  • [#627] fix(tool): fix import missing when having different alias for the same path.


  • [#651] refactor(server): server handler read/write interface return new context.


  • [#656] docs: remove wrong message in
  • [#683] docs(kerrors): fix kerrors WithCauseAndExtraMsg method comment.
  • [#625] chore: fix grammar of pull request template.
  • [#623] chore: modify the template of pull request.

Test & CI

  • [#646] test: fix ut failure caused by InitRPCInfoFunc not setting rpcinfo.
  • [#680] test: fix retry test race.
  • [#661] test: make wpool tests more stable.
  • [#643] test: add test for detection server handler.
  • [#632] test: replace handwritten mock classes with gomock auto-generated classes.
  • [#697] chore(ci): fixed skywalking-eyes version.
  • [#652] chore(ci): delete repeated tests to reduce unit tests cost times.
  • [#588] chore(ci): support codecov.