From 19ca58afd190db2718b2de894b06af8f6b996628 Mon Sep 17 00:00:00 2001 From: Nadia Mayor Date: Tue, 5 Sep 2023 11:33:34 -0300 Subject: [PATCH 1/3] [SDKS-7446] Remove stop SSE from destroy when SDK is in polling mode --- .../main/java/io/split/engine/common/SyncManagerImp.java | 6 ++++-- .../java/io/split/engine/common/SyncManagerTest.java | 9 +++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/client/src/main/java/io/split/engine/common/SyncManagerImp.java b/client/src/main/java/io/split/engine/common/SyncManagerImp.java index 89d826cba..97b2c7474 100644 --- a/client/src/main/java/io/split/engine/common/SyncManagerImp.java +++ b/client/src/main/java/io/split/engine/common/SyncManagerImp.java @@ -160,8 +160,10 @@ public void shutdown() throws IOException { _shuttedDown.set(true); _initializationtExecutorService.shutdownNow(); _synchronizer.stopPeriodicFetching(); - _pushManager.stop(); - _pushMonitorExecutorService.shutdownNow(); + if (_streamingEnabledConfig.get()) { + _pushManager.stop(); + _pushMonitorExecutorService.shutdownNow(); + } _segmentSynchronizationTaskImp.close(); _log.info("Successful shutdown of segment fetchers"); _splitSynchronizationTask.close(); diff --git a/client/src/test/java/io/split/engine/common/SyncManagerTest.java b/client/src/test/java/io/split/engine/common/SyncManagerTest.java index adb158f8f..f1c1699cd 100644 --- a/client/src/test/java/io/split/engine/common/SyncManagerTest.java +++ b/client/src/test/java/io/split/engine/common/SyncManagerTest.java @@ -64,6 +64,7 @@ public void startWithStreamingFalseShouldStartPolling() throws InterruptedExcept Mockito.verify(_pushManager, Mockito.times(0)).start(); syncManager.shutdown(); + Mockito.verify(_pushManager, Mockito.times(0)).stop(); Mockito.verify(_synchronizer, Mockito.times(1)).stopPeriodicDataRecording(); } @@ -86,7 +87,7 @@ public void startWithStreamingTrueShouldStartSyncAll() throws InterruptedExcepti } @Test - public void onStreamingAvailable() throws InterruptedException, IOException { + public void onStreamingAvailable() throws InterruptedException { TelemetryStorage telemetryStorage = Mockito.mock(TelemetryStorage.class); LinkedBlockingQueue messages = new LinkedBlockingQueue<>(); SplitTasks splitTasks = SplitTasks.build(_splitSynchronizationTask, _segmentSynchronizationTaskImp, @@ -107,7 +108,7 @@ public void onStreamingAvailable() throws InterruptedException, IOException { } @Test - public void onStreamingDisabled() throws InterruptedException, IOException { + public void onStreamingDisabled() throws InterruptedException { TelemetryStorage telemetryStorage = new InMemoryTelemetryStorage(); LinkedBlockingQueue messsages = new LinkedBlockingQueue<>(); SplitTasks splitTasks = SplitTasks.build(_splitSynchronizationTask, _segmentSynchronizationTaskImp, @@ -127,7 +128,7 @@ public void onStreamingDisabled() throws InterruptedException, IOException { } @Test - public void onStreamingShutdown() throws InterruptedException, IOException { + public void onStreamingShutdown() throws InterruptedException { TelemetryStorage telemetryStorage = new InMemoryTelemetryStorage(); LinkedBlockingQueue messsages = new LinkedBlockingQueue<>(); SplitTasks splitTasks = SplitTasks.build(_splitSynchronizationTask, _segmentSynchronizationTaskImp, @@ -229,4 +230,4 @@ public void syncAllRetryThenShouldStartPolling() throws InterruptedException, IO syncManager.shutdown(); Mockito.verify(_synchronizer, Mockito.times(1)).stopPeriodicDataRecording(); } -} +} \ No newline at end of file From eb89370849e4e67ef778bf9d3e568ddc084a86a4 Mon Sep 17 00:00:00 2001 From: Nadia Mayor Date: Wed, 6 Sep 2023 17:34:24 -0300 Subject: [PATCH 2/3] Update version --- client/pom.xml | 2 +- pluggable-storage/pom.xml | 2 +- pom.xml | 2 +- redis-wrapper/pom.xml | 2 +- testing/pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/pom.xml b/client/pom.xml index a775f5fb4..e9a277096 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -5,7 +5,7 @@ io.split.client java-client-parent - 4.8.1 + 4.8.2-rc2 java-client jar diff --git a/pluggable-storage/pom.xml b/pluggable-storage/pom.xml index f2a69fc6a..e292e0447 100644 --- a/pluggable-storage/pom.xml +++ b/pluggable-storage/pom.xml @@ -6,7 +6,7 @@ java-client-parent io.split.client - 4.8.1 + 4.8.2-rc2 2.0.0 diff --git a/pom.xml b/pom.xml index 9b4160086..8c3061155 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 io.split.client java-client-parent - 4.8.1 + 4.8.2-rc2 diff --git a/redis-wrapper/pom.xml b/redis-wrapper/pom.xml index 99b77073e..f3e40fef6 100644 --- a/redis-wrapper/pom.xml +++ b/redis-wrapper/pom.xml @@ -6,7 +6,7 @@ java-client-parent io.split.client - 4.8.1 + 4.8.2-rc2 redis-wrapper 3.0.1 diff --git a/testing/pom.xml b/testing/pom.xml index d35996d06..47da26be9 100644 --- a/testing/pom.xml +++ b/testing/pom.xml @@ -5,7 +5,7 @@ io.split.client java-client-parent - 4.8.1 + 4.8.2-rc2 java-client-testing jar From 905afa62a9eccc19872ad90e6b5ffa33a58ec77e Mon Sep 17 00:00:00 2001 From: Nadia Mayor Date: Thu, 7 Sep 2023 10:19:18 -0300 Subject: [PATCH 3/3] Update version --- client/pom.xml | 2 +- pluggable-storage/pom.xml | 2 +- pom.xml | 2 +- redis-wrapper/pom.xml | 2 +- testing/pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/pom.xml b/client/pom.xml index e9a277096..a775f5fb4 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -5,7 +5,7 @@ io.split.client java-client-parent - 4.8.2-rc2 + 4.8.1 java-client jar diff --git a/pluggable-storage/pom.xml b/pluggable-storage/pom.xml index e292e0447..f2a69fc6a 100644 --- a/pluggable-storage/pom.xml +++ b/pluggable-storage/pom.xml @@ -6,7 +6,7 @@ java-client-parent io.split.client - 4.8.2-rc2 + 4.8.1 2.0.0 diff --git a/pom.xml b/pom.xml index 8c3061155..9b4160086 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 io.split.client java-client-parent - 4.8.2-rc2 + 4.8.1 diff --git a/redis-wrapper/pom.xml b/redis-wrapper/pom.xml index f3e40fef6..99b77073e 100644 --- a/redis-wrapper/pom.xml +++ b/redis-wrapper/pom.xml @@ -6,7 +6,7 @@ java-client-parent io.split.client - 4.8.2-rc2 + 4.8.1 redis-wrapper 3.0.1 diff --git a/testing/pom.xml b/testing/pom.xml index 47da26be9..d35996d06 100644 --- a/testing/pom.xml +++ b/testing/pom.xml @@ -5,7 +5,7 @@ io.split.client java-client-parent - 4.8.2-rc2 + 4.8.1 java-client-testing jar