Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
4.18.1 (Sep 30, 2025)
- Fixed an issue where Streaming client hangs during token renew process.

4.18.0 (Sep 12, 2025)
- Added new configuration for Fallback Treatments, which allows setting a treatment value and optional config to be returned in place of "control", either globally or by flag. Read more in our docs.

Expand Down
6 changes: 3 additions & 3 deletions client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<parent>
<groupId>io.split.client</groupId>
<artifactId>java-client-parent</artifactId>
<version>4.18.0</version>
<version>4.18.1</version>
</parent>
<version>4.18.0</version>
<version>4.18.1</version>
<artifactId>java-client</artifactId>
<packaging>jar</packaging>
<name>Java Client</name>
Expand Down Expand Up @@ -171,7 +171,7 @@
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>5.4.4</version>
<version>5.5</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,7 @@ private void verifyRates() {
if (_metricsRefreshRate < 30) {
throw new IllegalArgumentException("metricsRefreshRate must be >= 30: " + _metricsRefreshRate);
}

if(_telemetryRefreshRate < 60) {
throw new IllegalStateException("_telemetryRefreshRate must be >= 60");
}
Expand Down
22 changes: 17 additions & 5 deletions client/src/main/java/io/split/engine/common/PushManagerImp.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ public void start() {
} else {
_pushStatusTracker.forcePushDisable();
}
} catch (Exception e) {
_log.debug("Exception in PushManager start: " + e.getMessage());
} finally {
lock.unlock();
}
Expand All @@ -129,6 +131,8 @@ public void stop() {
lock.lock();
_log.debug("Stopping PushManagerImp");
cleanUpResources();
} catch (Exception e) {
_log.debug("Exception in stopping push manager: " + e.getMessage());
} finally {
lock.unlock();
}
Expand Down Expand Up @@ -156,14 +160,22 @@ private boolean startSse(String token, String channels) {

@Override
public void startWorkers() {
_featureFlagsWorker.start();
_segmentWorker.start();
try {
_featureFlagsWorker.start();
_segmentWorker.start();
} catch (Exception e) {
_log.debug("Exception in starting workers: " + e.getMessage());
}
}

@Override
public void stopWorkers() {
_featureFlagsWorker.stop();
_segmentWorker.stop();
try {
_featureFlagsWorker.stop();
_segmentWorker.stop();
} catch (Exception e) {
_log.debug("Exception in stopping workers: " + e.getMessage());
}
}

private void cleanUpResources() {
Expand All @@ -174,4 +186,4 @@ private void cleanUpResources() {
_nextTokenRefreshTask.cancel(false);
}
}
}
}
20 changes: 8 additions & 12 deletions client/src/main/java/io/split/engine/sse/client/SSEClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.apache.hc.client5.http.classic.methods.HttpGet;
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
import org.apache.hc.core5.io.CloseMode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -115,19 +116,18 @@ public boolean isOpen() {
}

public void close() {
_log.debug("closing SSE client");
try {
lock.lock();
_forcedStop.set(true);
if (_state.compareAndSet(ConnectionState.OPEN, ConnectionState.CLOSED)) {
if (_ongoingResponse.get() != null) {
try {
_ongoingRequest.get().abort();
_ongoingResponse.get().close();
} catch (IOException e) {
_log.debug(String.format("SSEClient close forced: %s", e.getMessage()));
}
_ongoingRequest.get().abort();
_ongoingResponse.get().close(CloseMode.IMMEDIATE);
}
}
} catch (Exception e) {
_log.debug("Exception in closing SSE client: " + e.getMessage());
} finally {
lock.unlock();
}
Expand Down Expand Up @@ -184,19 +184,15 @@ private void connectAndLoop(URI uri, CountDownLatch signal) {
}
}
} catch (Exception e) { // Any other error non related to the connection disables streaming altogether
_log.debug(String.format("SSE connection exception: %s", e.getMessage()));
_telemetryRuntimeProducer
.recordStreamingEvents(new StreamingEvent(StreamEventsEnum.SSE_CONNECTION_ERROR.getType(),
StreamEventsEnum.SseConnectionErrorValues.NON_REQUESTED_CONNECTION_ERROR.getValue(),
System.currentTimeMillis()));
_log.warn(e.getMessage(), e);
_statusCallback.apply(StatusMessage.NONRETRYABLE_ERROR);
} finally {
try {
_ongoingResponse.get().close();
} catch (IOException e) {
_log.debug(e.getMessage());
}

_ongoingResponse.get().close(CloseMode.IMMEDIATE);
_state.set(ConnectionState.CLOSED);
_log.debug("SSEClient finished.");
_forcedStop.set(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public Worker(String workerName) {

public void start() {
if (_running.compareAndSet(false, true)) {
_log.debug(String.format("%s Worker starting ...", _workerName));
_queue.clear();
_thread = new Thread( this);
_thread.setName(String.format("%s-worker", _workerName));
_thread.start();
_log.debug(String.format("%s Worker started ...", _workerName));
} else {
_log.debug(String.format("%s Worker already running.", _workerName));
return;
Expand Down
6 changes: 3 additions & 3 deletions okhttp-modules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<parent>
<artifactId>java-client-parent</artifactId>
<groupId>io.split.client</groupId>
<version>4.18.0</version>
<version>4.18.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<version>4.18.0</version>
<version>4.18.1</version>
<artifactId>okhttp-modules</artifactId>
<packaging>jar</packaging>
<name>http-modules</name>
Expand Down Expand Up @@ -55,7 +55,7 @@
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>5.4.1</version>
<version>5.5</version>
</dependency>
<!-- Test deps -->
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion pluggable-storage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>java-client-parent</artifactId>
<groupId>io.split.client</groupId>
<version>4.18.0</version>
<version>4.18.1</version>
</parent>

<version>2.1.0</version>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.split.client</groupId>
<artifactId>java-client-parent</artifactId>
<version>4.18.0</version>
<version>4.18.1</version>
<dependencyManagement>
<dependencies>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion redis-wrapper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>java-client-parent</artifactId>
<groupId>io.split.client</groupId>
<version>4.18.0</version>
<version>4.18.1</version>
</parent>
<artifactId>redis-wrapper</artifactId>
<version>3.1.1</version>
Expand Down
4 changes: 2 additions & 2 deletions testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<parent>
<groupId>io.split.client</groupId>
<artifactId>java-client-parent</artifactId>
<version>4.18.0</version>
<version>4.18.1</version>
</parent>
<artifactId>java-client-testing</artifactId>
<packaging>jar</packaging>
<version>4.18.0</version>
<version>4.18.1</version>
<name>Java Client For Testing</name>
<description>Testing suite for Java SDK for Split</description>
<dependencies>
Expand Down