finaglehelper on develop
finagle-http: Remove expensive … (compare)
finaglehelper on develop
Revert "finagle-core: return an… (compare)
finaglehelper on develop
finagle-core: Deprecate Legacy … (compare)
finaglehelper on develop
finagle-core: Add `CertsAndKey`… (compare)
finaglehelper on develop
finagle-core: return an empty b… (compare)
Hi everyone!
I got a question about dependency versions and security issues. The latest release from finagle
is using the zookeeper
version "3.5.0-alpha"
which uses a vulnerable version from io.netty/netty 3.x
.
After reading some issues and PR's, I've saw this issue (twitter/finagle#665) mentioning some changes that make sure that finagle is not using netty on version 3.x anymore.
What I'm trying to figure out is if finagle is not using netty on version 3.x only on the finagle project or in a whole perspective (even 3rd party dependencies that use netty on an outdated version are having their netty dependency overriden).
If the issue that I've mentioned only takes effect on the finagle project, should it be considered a bump on the zookeeper version?
Thanks!
it looks like we should be able to bump to at least zk 3.5.5 safely, which I believe is on netty 4.x.
https://github.com/apache/zookeeper/blob/branch-3.5.5/build.xml#L40
3.5.5
I've got some type conversion errors. The latest version that didn't show any errors, only warnings was 3.5.4-beta
.3.5.4-beta
version?3.5.5
.
let
in order to change their values for execution of a function passed in to let
. Locals can be updated, and the updated value is visible to child threads. But updates in child threads are not visible to siblings. That's strictly right in asynchronous programming I suppose, but I'm not sure how to emulate something like the synchronous process A updates ThreadLocal X to 1, process B reads 1 from ThreadLocal X.
Does this help at all:
Finagle explicitly manages them for you across threads and execution contexts such as Future composition, FuturePools, Timers, and in some cases — across the client/server boundary.
Hi .. I am new to Finagle and I am using it in my java service. However, I am facing some problem while implementing retries in case of certain HTTP Error codes. The retry policy shouldRetry function does not gets called in case of request failing with certain error codes
here is the snippet of the code i am using to instantiate the client
private Service<Request, Response> buildClient(String host) throws Exception {
String hostString = String.format("%s:%s", host, "8080");
PartialFunction<Tuple2<Request, Response>, ResponseClass> typed =
new AbstractPartialFunction<Tuple2<Request, Response>, ResponseClass>() {
@Override
public boolean isDefinedAt(Tuple2<Request, Response> x) {
return x._2().status() == Status.InternalServerError() || x._2().status() == Status.ServiceUnavailable();
return true;
}
@Override
public ResponseClass apply(Tuple2<Request, Response> x) {
return ResponseClass.RetryableFailure();
}
};
return this.hostToClientMap.computeIfAbsent(host, s -> {
try {
return ClientBuilder.safeBuild(
ClientBuilder.get()
.stack(Http.client())
.hosts(hostString)
.hostConnectionLimit(serviceConfiguration.getHttp_max_conn_per_route())
.tcpConnectTimeout(Duration.fromMilliseconds(serviceConfiguration.getHttp_socket_timeout_in_ms()))
.keepAlive(true)
.tls(LogDispatcherFactory.buildSslContext(serviceConfiguration.getSsm_store_region(),
serviceConfiguration.getPrism_certificate_path(),
serviceConfiguration.getPrism_certificate_key_path(),
serviceConfiguration.getTruststore_password()))
.connectTimeout(Duration.fromMilliseconds(serviceConfiguration.getHttp_connect_timeout_in_ms()))
.requestTimeout(Duration.fromMilliseconds(serviceConfiguration.getHttp_request_timeout_in_ms()))
.retryPolicy(new CustomRetryPolicy())
.retryBudget(RetryBudgets.newRetryBudget(Duration.fromSeconds(10), 10, 1))
.failFast(false)
.responseClassifier(HttpResponseClassifier.apply(typed))
.reportTo(DefaultStatsReceiver.get()));
} catch (Exception e) {
logger.error(String.format("Error initializing the finagle client for host %s.", hostString), e);
return null;
}
});
}
Any thoughts on this ???