PY-18029 Maximum frame length of "directed" messages increased

This commit is contained in:
Alexander Koshevoy
2018-08-22 23:16:40 +03:00
parent 9d86c56529
commit 0c5bc0cfb0
2 changed files with 2 additions and 2 deletions
@@ -66,7 +66,7 @@ class TNettyClientTransport(private val host: String,
override fun initChannel(ch: SocketChannel) {
ch.pipeline().addLast(LoggingHandler(LogLevel.DEBUG))
ch.pipeline().addLast(LengthFieldBasedFrameDecoder(1024, 0, 4, 0, 4))
ch.pipeline().addLast(LengthFieldBasedFrameDecoder(1048576, 0, 4, 0, 4))
ch.pipeline().addLast(LengthFieldPrepender(4))
ch.pipeline().addLast(DirectedMessageCodec())
@@ -75,7 +75,7 @@ class TNettyServerTransport(port: Int) : TServerTransport() {
ch.pipeline().addLast(LoggingHandler())
// `FixedLengthFrameDecoder` is excessive but convenient
ch.pipeline().addLast(LengthFieldBasedFrameDecoder(1024, 0, 4, 0, 4))
ch.pipeline().addLast(LengthFieldBasedFrameDecoder(1048576, 0, 4, 0, 4))
ch.pipeline().addLast(LengthFieldPrepender(4))
// `DirectedMessageCodec` is above Thrift messages
ch.pipeline().addLast(DirectedMessageCodec())