Permalink
Browse files

ISPN-2015 Upgrade to Netty 3.4.5

* select() call timeout in this Netty version is smaller, which might
yield better performance with client stress tests.
* it removes the need of the custom replaying decoder cos this netty
version handles memory better.
  • Loading branch information...
1 parent 6b345cd commit a6ce841f736a386771b2b2a50db7c6f460ee01d3 @galderz galderz committed with mmarkus May 14, 2012
@@ -95,7 +95,7 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.jboss.netty</groupId>
+ <groupId>io.netty</groupId>
<artifactId>netty</artifactId>
<version>${version.netty}</version>
</dependency>
@@ -60,7 +60,7 @@
</dependency>
<dependency>
- <groupId>org.jboss.netty</groupId>
+ <groupId>io.netty</groupId>
<artifactId>netty</artifactId>
<version>${version.netty}</version>
</dependency>
View
@@ -157,7 +157,7 @@
<version.milyn.smooks>1.2.2</version.milyn.smooks>
<version.mockito>1.8.5</version.mockito>
<version.mysql.driver>5.1.19</version.mysql.driver>
- <version.netty>3.2.6.Final</version.netty>
+ <version.netty>3.4.5.Final</version.netty>
<version.org.jboss.naming>5.0.6.CR1</version.org.jboss.naming>
<version.resteasy>2.3.2.Final</version.resteasy>
<version.rhq.helpers>3.0.4</version.rhq.helpers>
@@ -505,7 +505,7 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.jboss.netty</groupId>
+ <groupId>io.netty</groupId>
<artifactId>netty</artifactId>
<version>${version.netty}</version>
</dependency>
View
@@ -44,7 +44,7 @@
<dependencies>
<dependency>
- <groupId>org.jboss.netty</groupId>
+ <groupId>io.netty</groupId>
<artifactId>netty</artifactId>
</dependency>
@@ -33,8 +33,8 @@ import org.jboss.netty.channel._
import DecoderState._
import org.infinispan.util.ClusterIdGenerator
import logging.Log
-import org.infinispan.server.core.transport.CustomReplayingDecoder
import java.lang.StringBuilder
+import org.jboss.netty.handler.codec.replay.ReplayingDecoder
/**
* Common abstract decoder for Memcached and Hot Rod protocols.
@@ -43,8 +43,7 @@ import java.lang.StringBuilder
* @since 4.1
*/
abstract class AbstractProtocolDecoder[K, V <: CacheValue](transport: NettyTransport)
- extends CustomReplayingDecoder[DecoderState](DECODE_HEADER, true,
- AbstractProtocolDecoder.DefaultSlimDownSize) with Log {
+ extends ReplayingDecoder[DecoderState](DECODE_HEADER, true) with Log {
import AbstractProtocolDecoder._
type SuitableParameters <: RequestParameters
@@ -191,7 +190,6 @@ abstract class AbstractProtocolDecoder[K, V <: CacheValue](transport: NettyTrans
// into a request that has no params
params = null.asInstanceOf[SuitableParameters]
rawValue = null.asInstanceOf[Array[Byte]] // Clear reference to value
- slimDownBuffer() // Slim down buffer in case it's grown too big
null
}
@@ -366,18 +364,16 @@ abstract class AbstractProtocolDecoder[K, V <: CacheValue](transport: NettyTrans
ctx.sendUpstream(e)
}
- override def messageReceived(ctx: ChannelHandlerContext, e: MessageEvent) = {
+ override def messageReceived(ctx: ChannelHandlerContext, e: MessageEvent) {
transport.updateTotalBytesRead(e)
super.messageReceived(ctx, e)
}
-
}
object AbstractProtocolDecoder extends Log {
private val SecondsInAMonth = 60 * 60 * 24 * 30
private val DefaultTimeUnit = TimeUnit.MILLISECONDS
- private val DefaultSlimDownSize = 5 * 1024 * 1024
}
class RequestHeader {
@@ -22,11 +22,10 @@
*/
package org.infinispan.server.core
-import org.infinispan.manager.{EmbeddedCacheManager}
-import org.infinispan.server.core.transport.CustomReplayingDecoder
+import org.infinispan.manager.EmbeddedCacheManager
import java.util.Properties
import org.jboss.netty.handler.codec.oneone.OneToOneEncoder
-import org.jboss.netty.handler.codec.replay.ReplayingDecoder
+import org.jboss.netty.channel.ChannelHandler
/**
* Represents a protocol compliant server.
@@ -65,5 +64,5 @@ trait ProtocolServer {
* Gets the decoder for this protocol server. The decoder is responsible for reading client requests.
* This method cannot return null.
*/
- def getDecoder: CustomReplayingDecoder[DecoderState]
+ def getDecoder: ChannelHandler
}
Oops, something went wrong.

0 comments on commit a6ce841

Please sign in to comment.