allow striping clients in FaultTolerantHttpClient

This commit is contained in:
Ravi Khadiwala
2024-04-02 13:01:56 -05:00
committed by ravi-signal
parent bb0da69c9e
commit 3a1ecb342f
5 changed files with 124 additions and 22 deletions

View File

@@ -86,6 +86,7 @@ public class Cdn3RemoteStorageManager implements RemoteStorageManager {
.withConnectTimeout(Duration.ofSeconds(10))
.withVersion(HttpClient.Version.HTTP_2)
.withTrustedServerCertificates(cdnCaCertificates.toArray(new String[0]))
.withNumClients(configuration.numHttpClients())
.build();
// Client used for calls to storage-manager
@@ -98,6 +99,7 @@ public class Cdn3RemoteStorageManager implements RemoteStorageManager {
.withRetry(retryConfiguration)
.withConnectTimeout(Duration.ofSeconds(10))
.withVersion(HttpClient.Version.HTTP_2)
.withNumClients(configuration.numHttpClients())
.build();
}
@@ -164,7 +166,7 @@ public class Cdn3RemoteStorageManager implements RemoteStorageManager {
if (actualSourceLength != expectedSourceLength) {
throw new InvalidLengthException(
"Provided sourceLength " + expectedSourceLength + " was " + actualSourceLength);
"Provided sourceLength " + expectedSourceLength + " was " + actualSourceLength);
}
final int expectedEncryptedLength = encrypter.outputSize(expectedSourceLength);