From b24e192a30c63c2b799aee24bf79f3100ab4bbdf Mon Sep 17 00:00:00 2001 From: segabriel Date: Sun, 15 Dec 2019 12:01:44 +0200 Subject: [PATCH 1/5] Updated rsocket version --- pom.xml | 31 ++++++------------- .../rsocket/RSocketClientTransport.java | 7 ++--- .../rsocket/RSocketServerTransport.java | 7 ++--- 3 files changed, 14 insertions(+), 31 deletions(-) diff --git a/pom.xml b/pom.xml index 51521b0e4..ef17d92ee 100644 --- a/pom.xml +++ b/pom.xml @@ -27,12 +27,12 @@ 1.0.1 1.2.2 0.3.11 - Californium-SR8 - 0.11.21 + Dysprosium-RELEASE + 1.0.0-RC5 3.1.2 1.6.0 - 4.1.36.Final - 0.8.8.RELEASE + 4.1.37.Final + 0.9.0.RELEASE 1.7.7 2.11.0 3.4.2 @@ -112,13 +112,10 @@ io.rsocket - rsocket-core - ${rsocket.version} - - - io.rsocket - rsocket-transport-netty + rsocket-bom ${rsocket.version} + pom + import @@ -161,20 +158,12 @@ - - io.projectreactor.netty - reactor-netty - ${reactor-netty.version} - io.netty - netty-common - ${netty.version} - - - io.netty - netty-buffer + netty-bom ${netty.version} + pom + import diff --git a/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientTransport.java b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientTransport.java index e3c63cee9..63ce34405 100644 --- a/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientTransport.java +++ b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientTransport.java @@ -2,8 +2,8 @@ import io.rsocket.RSocket; import io.rsocket.RSocketFactory; +import io.rsocket.frame.decoder.PayloadDecoder; import io.rsocket.transport.netty.client.TcpClientTransport; -import io.rsocket.util.ByteBufPayload; import io.scalecube.net.Address; import io.scalecube.services.transport.api.ClientChannel; import io.scalecube.services.transport.api.ClientTransport; @@ -49,10 +49,7 @@ private Mono connect(Address address, Map> monoM Mono rsocketMono = RSocketFactory.connect() - .frameDecoder( - frame -> - ByteBufPayload.create( - frame.sliceData().retain(), frame.sliceMetadata().retain())) + .frameDecoder(PayloadDecoder.ZERO_COPY) .errorConsumer( th -> LOGGER.warn("Exception occurred at rsocket client transport: " + th)) .transport(() -> TcpClientTransport.create(tcpClient)) diff --git a/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketServerTransport.java b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketServerTransport.java index fd469af13..be39a31a3 100644 --- a/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketServerTransport.java +++ b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketServerTransport.java @@ -1,9 +1,9 @@ package io.scalecube.services.transport.rsocket; import io.rsocket.RSocketFactory; +import io.rsocket.frame.decoder.PayloadDecoder; import io.rsocket.transport.netty.server.CloseableChannel; import io.rsocket.transport.netty.server.TcpServerTransport; -import io.rsocket.util.ByteBufPayload; import io.scalecube.net.Address; import io.scalecube.services.methods.ServiceMethodRegistry; import io.scalecube.services.transport.api.ServerTransport; @@ -54,10 +54,7 @@ public Mono bind(ServiceMethodRegistry methodRegistry) { }); return RSocketFactory.receive() - .frameDecoder( - frame -> - ByteBufPayload.create( - frame.sliceData().retain(), frame.sliceMetadata().retain())) + .frameDecoder(PayloadDecoder.ZERO_COPY) .errorConsumer( th -> LOGGER.warn("Exception occurred at rsocket server transport: " + th)) .acceptor(new RSocketServiceAcceptor(codec, methodRegistry)) From b3a9c839b16a4e6bfa18a55a75b84b97488d6d38 Mon Sep 17 00:00:00 2001 From: segabriel Date: Sun, 15 Dec 2019 14:04:39 +0200 Subject: [PATCH 2/5] wip --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ef17d92ee..e1aa00848 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ 2.10.0.pr1 - 2.4.9 + 2.4.10-SNAPSHOT 1.0.1 1.2.2 0.3.11 From ce7334e82e46f7a322deda357dec92754a47d3f4 Mon Sep 17 00:00:00 2001 From: segabriel Date: Mon, 16 Dec 2019 14:34:11 +0200 Subject: [PATCH 3/5] Applied jackson bom --- pom.xml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index e1aa00848..6268c8f12 100644 --- a/pom.xml +++ b/pom.xml @@ -120,19 +120,11 @@ - com.fasterxml.jackson.core - jackson-core - ${jackson.version} - - - com.fasterxml.jackson.core - jackson-databind - ${jackson.version} - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 + com.fasterxml.jackson + jackson-bom ${jackson.version} + pom + import From 00b36a29cdf62be0eb33b728b23c6e6492993b17 Mon Sep 17 00:00:00 2001 From: segabriel Date: Thu, 2 Jan 2020 11:28:07 +0200 Subject: [PATCH 4/5] Changed scalecube-cluster.version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6268c8f12..87c4a3f5c 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ 2.10.0.pr1 - 2.4.10-SNAPSHOT + 2.4.10-RC1 1.0.1 1.2.2 0.3.11 From 49b0df460bef6455f6c0d296059b199e3f65fd5c Mon Sep 17 00:00:00 2001 From: segabriel Date: Thu, 2 Jan 2020 14:17:07 +0200 Subject: [PATCH 5/5] Changed frameDecoder to default (lots of leaks were found) --- .../services/transport/rsocket/RSocketClientTransport.java | 2 +- .../services/transport/rsocket/RSocketServerTransport.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientTransport.java b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientTransport.java index 63ce34405..f769376a1 100644 --- a/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientTransport.java +++ b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientTransport.java @@ -49,7 +49,7 @@ private Mono connect(Address address, Map> monoM Mono rsocketMono = RSocketFactory.connect() - .frameDecoder(PayloadDecoder.ZERO_COPY) + .frameDecoder(PayloadDecoder.DEFAULT) .errorConsumer( th -> LOGGER.warn("Exception occurred at rsocket client transport: " + th)) .transport(() -> TcpClientTransport.create(tcpClient)) diff --git a/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketServerTransport.java b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketServerTransport.java index be39a31a3..e1aa62efc 100644 --- a/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketServerTransport.java +++ b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketServerTransport.java @@ -54,7 +54,7 @@ public Mono bind(ServiceMethodRegistry methodRegistry) { }); return RSocketFactory.receive() - .frameDecoder(PayloadDecoder.ZERO_COPY) + .frameDecoder(PayloadDecoder.DEFAULT) .errorConsumer( th -> LOGGER.warn("Exception occurred at rsocket server transport: " + th)) .acceptor(new RSocketServiceAcceptor(codec, methodRegistry))