Skip to content

Commit

Permalink
grpc: set compression args for TiKV service (tikv#17180)
Browse files Browse the repository at this point in the history
close tikv#17176

Set compression arguments for TiKV service. The compression arguments are loaded from TiKV config.
It will affect TiKV's response to TiDB.

Signed-off-by: ekexium <[email protected]>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Signed-off-by: 3AceShowHand <[email protected]>
  • Loading branch information
2 people authored and 3AceShowHand committed Jun 27, 2024
1 parent ffe9d23 commit 6cf8ba4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/server/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ where
.http2_max_ping_strikes(i32::MAX) // For pings without data from clients.
.keepalive_time(self.cfg.value().grpc_keepalive_time.into())
.keepalive_timeout(self.cfg.value().grpc_keepalive_timeout.into())
.default_compression_algorithm(self.cfg.value().grpc_compression_algorithm())
.default_gzip_compression_level(self.cfg.value().grpc_gzip_compression_level)
.build_args();

let sb = ServerBuilder::new(Arc::clone(&env))
Expand Down

0 comments on commit 6cf8ba4

Please sign in to comment.