From 7642dcf05fc5fb80ab3c1417b0ccfcd2c571d9e4 Mon Sep 17 00:00:00 2001 From: Vishal Date: Thu, 21 Jun 2018 12:45:11 +0530 Subject: [PATCH] Disable caching of connections from router to function pods (#742) A temporary fix for #723 which needs to be optimized in future. Disables caching of connections from the router to function pod/service. --- router/functionHandler.go | 2 ++ test/tests/test_fn_update/test_configmap_update.sh | 2 -- test/tests/test_fn_update/test_nd_pkg_update.sh | 2 -- test/tests/test_fn_update/test_secret_update.sh | 2 -- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/router/functionHandler.go b/router/functionHandler.go index 8689b419..4c82ffb2 100644 --- a/router/functionHandler.go +++ b/router/functionHandler.go @@ -94,6 +94,8 @@ func (roundTripper RetryingRoundTripper) RoundTrip(req *http.Request) (resp *htt // set the timeout for transport context timeout := roundTripper.initialTimeout transport := http.DefaultTransport.(*http.Transport) + // Disables caching, Please refer to issue and specifically comment: https://github.com/fission/fission/issues/723#issuecomment-398781995 + transport.DisableKeepAlives = true // cache lookup to get serviceUrl serviceUrl, err = roundTripper.funcHandler.fmap.lookup(roundTripper.funcHandler.function) diff --git a/test/tests/test_fn_update/test_configmap_update.sh b/test/tests/test_fn_update/test_configmap_update.sh index c412726a..e356bf32 100755 --- a/test/tests/test_fn_update/test_configmap_update.sh +++ b/test/tests/test_fn_update/test_configmap_update.sh @@ -1,6 +1,4 @@ #!/bin/bash -# Disabling for https://github.com/fission/fission/issues/723 will enable after resolution/cluster upgrade -#test:disabled set -euo pipefail diff --git a/test/tests/test_fn_update/test_nd_pkg_update.sh b/test/tests/test_fn_update/test_nd_pkg_update.sh index 00677e02..ce47928a 100755 --- a/test/tests/test_fn_update/test_nd_pkg_update.sh +++ b/test/tests/test_fn_update/test_nd_pkg_update.sh @@ -1,6 +1,4 @@ #!/bin/bash -# Disabling for https://github.com/fission/fission/issues/723 will enable after resolution/cluster upgrade -#test:disabled set -euo pipefail diff --git a/test/tests/test_fn_update/test_secret_update.sh b/test/tests/test_fn_update/test_secret_update.sh index 9a5b358c..3dd5f778 100755 --- a/test/tests/test_fn_update/test_secret_update.sh +++ b/test/tests/test_fn_update/test_secret_update.sh @@ -1,6 +1,4 @@ #!/bin/bash -# Disabling for https://github.com/fission/fission/issues/723 will enable after resolution/cluster upgrade -#test:disabled set -euo pipefail