[trafficserver] branch master updated (7229939 -> 2188810)
This is an automated email from the ASF dual-hosted git repository. sudheerv pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 7229939 Update existingh formatting with new clang-format package add 2188810 1. Set a non-zero default value for TLS Client Handshake Timeout (#6781) No new revisions were added by this update. Summary of changes: doc/admin-guide/files/records.config.en.rst | 8 mgmt/RecordsConfig.cc | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
[trafficserver] branch 9.0.x updated (8505309 -> 977f919)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a change to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 8505309 Weird characters in debug message add 977f919 Revert "Add metrics to track default inactivity timed out connections (#6755)" No new revisions were added by this update. Summary of changes: iocore/net/UnixNetVConnection.cc | 15 --- 1 file changed, 15 deletions(-)
[trafficserver] branch 9.0.x updated (54875d1 -> 748804d)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a change to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 54875d1 1. Set a non-zero default value for TLS Client Handshake Timeout (#6781) new 49a1a9c Updates clang-format to LLVM v10.0.0 new 748804d Updated indentation with latest clang-format The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .clang-format| 14 -- include/tscore/ArgParser.h | 6 +- include/tscore/CryptoHash.h | 6 +- include/tscore/History.h | 6 +- include/tscore/IntrusivePtr.h| 8 ++-- include/tscore/IpMap.h | 6 -- include/tscore/Ptr.h | 12 ++-- include/tscore/Scalar.h | 24 ++-- include/tscore/TsBuffer.h| 15 ++- include/tscore/ink_memory.h | 6 +- include/tscpp/util/IntrusiveDList.h | 16 include/tscpp/util/MemSpan.h | 11 --- include/tscpp/util/TextView.h| 6 -- iocore/cache/CacheHosting.cc | 2 +- iocore/cache/I_Store.h | 6 +- iocore/cache/P_CacheArray.h | 8 ++-- iocore/eventsystem/I_IOBuffer.h | 12 iocore/eventsystem/P_IOBuffer.h | 3 ++- iocore/net/P_UnixNet.h | 6 +- iocore/net/quic/QUICFrame.h | 12 ++-- mgmt/ProxyConfig.h | 6 +- mgmt/utils/ExpandingArray.cc | 3 ++- plugins/experimental/magick/magick.cc| 4 +++- proxy/InkAPIInternal.h | 4 +++- proxy/Milestones.h | 12 ++-- proxy/logging/LogBuffer.h| 3 ++- src/tscore/HostLookup.cc | 6 -- src/tscore/Tokenizer.cc | 3 ++- src/tscore/unit_tests/test_Extendible.cc | 28 src/tscpp/api/Headers.cc | 12 src/wccp/WccpLocal.h | 9 ++--- tools/clang-format.sh| 6 +++--- 32 files changed, 213 insertions(+), 68 deletions(-)
[trafficserver] 01/02: Updates clang-format to LLVM v10.0.0
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 49a1a9c6852732a5bde0c32d99a63228604496f5 Author: Leif Hedstrom AuthorDate: Thu May 14 08:18:38 2020 -0600 Updates clang-format to LLVM v10.0.0 (cherry picked from commit a01b94b80cf0eff7c23e1e7b337f02ac82007969) --- .clang-format | 14 -- tools/clang-format.sh | 6 +++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.clang-format b/.clang-format index 292f1cc..cd564fb 100644 --- a/.clang-format +++ b/.clang-format @@ -11,7 +11,7 @@ AlignTrailingComments: true AllowAllArgumentsOnNextLine: true AllowAllConstructorInitializersOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: false -AllowShortBlocksOnASingleLine: false +AllowShortBlocksOnASingleLine: Never AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: Inline AllowShortLambdasOnASingleLine: All @@ -56,6 +56,7 @@ ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerIndentWidth: 2 ContinuationIndentWidth: 2 Cpp11BracedListStyle: true +DeriveLineEnding: true DerivePointerAlignment: false DisableFormat: false ExperimentalAutoDetectBinPacking: false @@ -71,12 +72,17 @@ IncludeBlocks: Preserve IncludeCategories: - Regex: '^"(llvm|llvm-c|clang|clang-c)/' Priority:2 +SortPriority:0 - Regex: '^(<|"(gtest|isl|json)/)' Priority:3 +SortPriority:0 - Regex: '.*' Priority:1 +SortPriority:0 IncludeIsMainRegex: '$' +IncludeIsMainSourceRegex: '' IndentCaseLabels: false +IndentGotoLabels: true IndentPPDirectives: None IndentWidth: 2 IndentWrappedFunctionNames: false @@ -112,18 +118,22 @@ SpaceBeforeCtorInitializerColon: true SpaceBeforeInheritanceColon: true SpaceBeforeParens: ControlStatements SpaceBeforeRangeBasedForLoopColon: true +SpaceInEmptyBlock: false SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 1 SpacesInAngles: false +SpacesInConditionalStatement: false SpacesInContainerLiterals: true SpacesInCStyleCastParentheses: false SpacesInParentheses: false SpacesInSquareBrackets: false -Standard:Cpp11 +SpaceBeforeSquareBrackets: false +Standard:Latest StatementMacros: - Q_UNUSED - QT_REQUIRE_VERSION TabWidth:8 +UseCRLF: false UseTab: Never ... diff --git a/tools/clang-format.sh b/tools/clang-format.sh index 7d85ebb..cac18c1 100755 --- a/tools/clang-format.sh +++ b/tools/clang-format.sh @@ -19,7 +19,7 @@ # limitations under the License. # Update the PKGDATE with the new version date when making a new clang-format binary package. -PKGDATE="20191031" +PKGDATE="20200514" function main() { set -e # exit on error @@ -27,7 +27,7 @@ function main() { DIR=${1:-.} PACKAGE="clang-format-${PKGDATE}.tar.bz2" - VERSION="clang-format version 9.0.0 (https://github.com/llvm/llvm-project.git 0399d5a9682b3cef71c653373e38890c63c4c365)" + VERSION="clang-format version 10.0.0 (https://github.com/llvm/llvm-project.git d32170dbd5b0d54436537b6b75beaf44324e0c28)" URL=${URL:-https://ci.trafficserver.apache.org/bintray/${PACKAGE}} @@ -62,7 +62,7 @@ function main() { ${CURL} -L --progress-bar -o ${ARCHIVE} ${URL} ${TAR} -x -C ${ROOT} -f ${ARCHIVE} cat > ${ROOT}/sha1 << EOF -c1b7ae57bfc80507ee155779a1ab8cf919b3e062 ${ARCHIVE} +5eec43e5c7f3010d6e6f37639491cabe51de0ab2 ${ARCHIVE} EOF ${SHASUM} -c ${ROOT}/sha1 chmod +x ${FORMAT}
[trafficserver] 02/02: Updated indentation with latest clang-format
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 748804d68e451c00736440ee183811219433739d Author: Leif Hedstrom AuthorDate: Thu May 14 14:19:40 2020 -0600 Updated indentation with latest clang-format --- include/tscore/ArgParser.h | 6 +- include/tscore/CryptoHash.h | 6 +- include/tscore/History.h | 6 +- include/tscore/IntrusivePtr.h| 8 ++-- include/tscore/IpMap.h | 6 -- include/tscore/Ptr.h | 12 ++-- include/tscore/Scalar.h | 24 ++-- include/tscore/TsBuffer.h| 15 ++- include/tscore/ink_memory.h | 6 +- include/tscpp/util/IntrusiveDList.h | 16 include/tscpp/util/MemSpan.h | 11 --- include/tscpp/util/TextView.h| 6 -- iocore/cache/CacheHosting.cc | 2 +- iocore/cache/I_Store.h | 6 +- iocore/cache/P_CacheArray.h | 8 ++-- iocore/eventsystem/I_IOBuffer.h | 12 iocore/eventsystem/P_IOBuffer.h | 3 ++- iocore/net/P_UnixNet.h | 6 +- iocore/net/quic/QUICFrame.h | 12 ++-- mgmt/ProxyConfig.h | 6 +- mgmt/utils/ExpandingArray.cc | 3 ++- plugins/experimental/magick/magick.cc| 4 +++- proxy/InkAPIInternal.h | 4 +++- proxy/Milestones.h | 12 ++-- proxy/logging/LogBuffer.h| 3 ++- src/tscore/HostLookup.cc | 6 -- src/tscore/Tokenizer.cc | 3 ++- src/tscore/unit_tests/test_Extendible.cc | 28 src/tscpp/api/Headers.cc | 12 src/wccp/WccpLocal.h | 9 ++--- 30 files changed, 198 insertions(+), 63 deletions(-) diff --git a/include/tscore/ArgParser.h b/include/tscore/ArgParser.h index 45b0e41..a7b4b7a 100644 --- a/include/tscore/ArgParser.h +++ b/include/tscore/ArgParser.h @@ -48,7 +48,11 @@ public: // bool to check if certain command/option is called operator bool() const noexcept { return _is_called; } // index accessing [] - std::string const [](int x) const { return _values.at(x); } + std::string const & + operator[](int x) const + { +return _values.at(x); + } // return the Environment variable std::string const () const noexcept; // iterator for arguments diff --git a/include/tscore/CryptoHash.h b/include/tscore/CryptoHash.h index 27077ad..767cb7b 100644 --- a/include/tscore/CryptoHash.h +++ b/include/tscore/CryptoHash.h @@ -84,7 +84,11 @@ union CryptoHash { } /// Access 64 bit slice. - uint64_t operator[](int i) const { return u64[i]; } + uint64_t + operator[](int i) const + { +return u64[i]; + } /// Access 64 bit slice. /// @note Identical to @ operator[] but included for symmetry. uint64_t diff --git a/include/tscore/History.h b/include/tscore/History.h index e413dda..de8feb7 100644 --- a/include/tscore/History.h +++ b/include/tscore/History.h @@ -67,7 +67,11 @@ public: return history_pos > Count ? Count : history_pos; } - const HistoryEntry [](unsigned int i) const { return history[i]; } + const HistoryEntry & + operator[](unsigned int i) const + { +return history[i]; + } private: HistoryEntry history[Count]; diff --git a/include/tscore/IntrusivePtr.h b/include/tscore/IntrusivePtr.h index dcf54ae..bfe63a3 100644 --- a/include/tscore/IntrusivePtr.h +++ b/include/tscore/IntrusivePtr.h @@ -472,13 +472,17 @@ IntrusivePtr::operator=(IntrusivePtr &) return *this; } -template T *IntrusivePtr::operator->() const +template +T * +IntrusivePtr::operator->() const { IntrusivePtrPolicy::dereferenceCheck(m_obj); return m_obj; } -template T ::operator*() const +template +T & +IntrusivePtr::operator*() const { IntrusivePtrPolicy::dereferenceCheck(m_obj); return *m_obj; diff --git a/include/tscore/IpMap.h b/include/tscore/IpMap.h index d84dbc4..4268afa 100644 --- a/include/tscore/IpMap.h +++ b/include/tscore/IpMap.h @@ -482,12 +482,14 @@ IpMap::iterator::operator==(iterator const ) const return _tree == that._tree && _node == that._node; } -inline IpMap::iterator::reference IpMap::iterator::operator*() const +inline IpMap::iterator::reference +IpMap::iterator::operator*() const { return *_node; } -inline IpMap::iterator::pointer IpMap::iterator::operator->() const +inline IpMap::iterator::pointer +IpMap::iterator::operator->() const { return _node; } diff --git a/include/tscore/Ptr.h b/include/tscore/Ptr.h index 3a79e01..3e93477 100644 --- a/include/tscore/Ptr.h +++ b/include/tscore/Ptr.h @@ -105,8 +105,16 @@ public: Ptr =(const Ptr &);
[trafficserver] branch 9.0.x updated: 1. Set a non-zero default value for TLS Client Handshake Timeout (#6781)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new 54875d1 1. Set a non-zero default value for TLS Client Handshake Timeout (#6781) 54875d1 is described below commit 54875d15166a7fe1d6520f3bbb2eee34309d4e51 Author: Sudheer Vinukonda AuthorDate: Thu May 14 12:46:39 2020 -0700 1. Set a non-zero default value for TLS Client Handshake Timeout (#6781) Set a non-zero default value for TLS Client Handshake Timeout doc updates to clarify that no activity timeouts will use default inactivity timeout value when they are set to 0 (cherry picked from commit 218881036c6bcf78bad7f5308545b6790096f886) --- doc/admin-guide/files/records.config.en.rst | 8 mgmt/RecordsConfig.cc | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/admin-guide/files/records.config.en.rst b/doc/admin-guide/files/records.config.en.rst index 0cb2509..11549b5 100644 --- a/doc/admin-guide/files/records.config.en.rst +++ b/doc/admin-guide/files/records.config.en.rst @@ -1230,8 +1230,8 @@ HTTP Connection Timeouts :overridable: Specifies how long |TS| keeps connections to clients open for a - subsequent request after a transaction ends. A value of ``0`` will disable - the no activity timeout. + subsequent request after a transaction ends. A value of ``0`` will set + `proxy.config.net.default_inactivity_timeout` as the timeout. See :ref:`admin-performance-timeouts` for more discussion on |TS| timeouts. @@ -1240,8 +1240,8 @@ HTTP Connection Timeouts :overridable: Specifies how long |TS| keeps connections to origin servers open - for a subsequent transfer of data after a transaction ends. A value of - ``0`` will disable the no activity timeout. + for a subsequent transfer of data after a transaction ends. A value of ``0`` will + set `proxy.config.net.default_inactivity_timeout` as the timeout. See :ref:`admin-performance-timeouts` for more discussion on |TS| timeouts. diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc index 5b29c4b..7173a96 100644 --- a/mgmt/RecordsConfig.cc +++ b/mgmt/RecordsConfig.cc @@ -1150,7 +1150,7 @@ static const RecordElement RecordsConfig[] = , {RECT_CONFIG, "proxy.config.ssl.server.dhparams_file", RECD_STRING, nullptr, RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL} , - {RECT_CONFIG, "proxy.config.ssl.handshake_timeout_in", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-65535]", RECA_NULL} + {RECT_CONFIG, "proxy.config.ssl.handshake_timeout_in", RECD_INT, "30", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-65535]", RECA_NULL} , {RECT_CONFIG, "proxy.config.ssl.cert.load_elevated", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-1]", RECA_READ_ONLY} ,
[trafficserver] branch master updated (02e8d5e -> 7229939)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 02e8d5e Fixed `AddressSanitizer: odr-violation` add a01b94b Updates clang-format to LLVM v10.0.0 add 7229939 Update existingh formatting with new clang-format package No new revisions were added by this update. Summary of changes: .clang-format| 14 -- include/tscore/ArgParser.h | 6 +- include/tscore/CryptoHash.h | 6 +- include/tscore/History.h | 6 +- include/tscore/IntrusivePtr.h| 8 ++-- include/tscore/IpMap.h | 6 -- include/tscore/Ptr.h | 12 ++-- include/tscore/Scalar.h | 24 ++-- include/tscore/TsBuffer.h| 15 ++- include/tscore/ink_memory.h | 6 +- include/tscpp/util/IntrusiveDList.h | 16 include/tscpp/util/MemSpan.h | 11 --- include/tscpp/util/TextView.h| 6 -- iocore/cache/CacheHosting.cc | 2 +- iocore/cache/I_Store.h | 6 +- iocore/cache/P_CacheArray.h | 8 ++-- iocore/eventsystem/I_IOBuffer.h | 12 iocore/eventsystem/P_IOBuffer.h | 3 ++- iocore/net/P_UnixNet.h | 6 +- iocore/net/quic/QUICFrame.h | 12 ++-- mgmt/ProxyConfig.h | 6 +- mgmt/utils/ExpandingArray.cc | 3 ++- plugins/experimental/magick/magick.cc| 4 +++- proxy/InkAPIInternal.h | 4 +++- proxy/Milestones.h | 12 ++-- proxy/logging/LogBuffer.h| 3 ++- src/tscore/HostLookup.cc | 6 -- src/tscore/Tokenizer.cc | 3 ++- src/tscore/unit_tests/test_Extendible.cc | 28 src/tscpp/api/Headers.cc | 12 src/wccp/WccpLocal.h | 9 ++--- tools/clang-format.sh| 6 +++--- 32 files changed, 213 insertions(+), 68 deletions(-)
[trafficserver] branch 8.1.x updated: This fixes parsing where the [ ] section gets merged into values
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 8.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.1.x by this push: new 6162da9 This fixes parsing where the [ ] section gets merged into values 6162da9 is described below commit 6162da9a6050720f9d00d314fddbc062befc8ada Author: Leif Hedstrom AuthorDate: Sun May 5 13:14:50 2019 -0600 This fixes parsing where the [ ] section gets merged into values For example: cond %{SEND_RESPONSE_HDR_HOOK} set-header X-First "First" set-header X-Last "Last" [L] would set the header X-Last: Last [L]. In addition, it also fixes a typo (I think?) in an unrelated test, however, it's unclear as to why it's not failing that test. CHECK_EQ(p.get_tokens()[1], "%{METHOD}c”); (cherry picked from commit 6eb82a932daa97668432681d34f4d603180b8d83) --- plugins/header_rewrite/header_rewrite.cc | 6 +- plugins/header_rewrite/header_rewrite_test.cc | 22 +++- plugins/header_rewrite/parser.cc | 79 +-- plugins/header_rewrite/parser.h | 29 +++--- plugins/header_rewrite/ruleset.cc | 3 +- plugins/header_rewrite/value.cc | 26 + 6 files changed, 97 insertions(+), 68 deletions(-) diff --git a/plugins/header_rewrite/header_rewrite.cc b/plugins/header_rewrite/header_rewrite.cc index 99b1961..f49728a 100644 --- a/plugins/header_rewrite/header_rewrite.cc +++ b/plugins/header_rewrite/header_rewrite.cc @@ -185,8 +185,10 @@ RulesConfig::parse_config(const std::string , TSHttpHookID default_hook) continue; } -Parser p(line); // Tokenize and parse this line -if (p.empty()) { +Parser p; + +// Tokenize and parse this line +if (!p.parse_line(line) || p.empty()) { continue; } diff --git a/plugins/header_rewrite/header_rewrite_test.cc b/plugins/header_rewrite/header_rewrite_test.cc index 6a4e181..bfc5b3a 100644 --- a/plugins/header_rewrite/header_rewrite_test.cc +++ b/plugins/header_rewrite/header_rewrite_test.cc @@ -44,7 +44,12 @@ TSError(const char *fmt, ...) class ParserTest : public Parser { public: - ParserTest(const std::string ) : Parser(line), res(true) { std::cout << "Finished parser test: " << line << std::endl; } + ParserTest(const std::string ) : res(true) + { +Parser::parse_line(line); +std::cout << "Finished parser test: " << line << std::endl; + } + std::vector getTokens() const { @@ -364,12 +369,13 @@ test_parsing() } { -ParserTest p(R"(set-header Alt-Svc "quic=\":443\"; v=\"35\"")"); +ParserTest p(R"(set-header Alt-Svc "quic=\":443\"; v=\"35\"" [L])"); -CHECK_EQ(p.getTokens().size(), 3UL); +CHECK_EQ(p.getTokens().size(), 4UL); CHECK_EQ(p.getTokens()[0], "set-header"); CHECK_EQ(p.getTokens()[1], "Alt-Svc"); CHECK_EQ(p.getTokens()[2], R"(quic=":443"; v="35")"); +CHECK_EQ(p.get_value(), R"(quic=":443"; v="35")"); END_TEST(); } @@ -472,12 +478,16 @@ test_tokenizer() SimpleTokenizerTest p("a simple test"); CHECK_EQ(p.get_tokens().size(), 1UL); CHECK_EQ(p.get_tokens()[0], "a simple test"); + +END_TEST(); } { SimpleTokenizerTest p(R"(quic=":443"; v="35")"); CHECK_EQ(p.get_tokens().size(), 1UL); CHECK_EQ(p.get_tokens()[0], R"(quic=":443"; v="35")"); + +END_TEST(); } { @@ -485,6 +495,8 @@ test_tokenizer() CHECK_EQ(p.get_tokens().size(), 2UL); CHECK_EQ(p.get_tokens()[0], "let's party like it's "); CHECK_EQ(p.get_tokens()[1], "%{NOW:YEAR}"); + +END_TEST(); } { SimpleTokenizerTest p("A racoon's favorite tag is % in %{NOW:YEAR}!"); @@ -494,6 +506,8 @@ test_tokenizer() CHECK_EQ(p.get_tokens()[2], " in "); CHECK_EQ(p.get_tokens()[3], "%{NOW:YEAR}"); CHECK_EQ(p.get_tokens()[4], "!"); + +END_TEST(); } { @@ -503,6 +517,8 @@ test_tokenizer() CHECK_EQ(p.get_tokens()[1], "%{IP:SERVER}"); CHECK_EQ(p.get_tokens()[2], ":"); CHECK_EQ(p.get_tokens()[3], "%{INBOUND:LOCAL-PORT}"); + +END_TEST(); } return errors; diff --git a/plugins/header_rewrite/parser.cc b/plugins/header_rewrite/parser.cc index 4fc1bf4..2959427 100644 --- a/plugins/header_rewrite/parser.cc +++ b/plugins/header_rewrite/parser.cc @@ -30,7 +30,8 @@ enum ParserState { PARSER_DEFAULT, PARSER_IN_QUOTE, PARSER_IN_REGEX, PARSER_IN_EXPANSION }; -Parser::Parser(const std::string _line) : _cond(false), _empty(false) +bool +Parser::parse_line(const std::string _line) { std::string line= original_line; ParserState state = PARSER_DEFAULT; @@ -85,7 +86,7 @@ Parser::Parser(const std::string _line) : _cond(false), _empty(false) TSError("[%s] malformed line \"%s\", ignoring", PLUGIN_NAME, line.c_str()); _tokens.clear();
[trafficserver] branch 9.0.x updated: Updated CHANGELOG
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new db3b0a7 Updated CHANGELOG db3b0a7 is described below commit db3b0a7579b016603d2e0c025c8bd0f1c7459def Author: Leif Hedstrom AuthorDate: Thu May 14 15:34:56 2020 -0600 Updated CHANGELOG --- CHANGELOG-9.0.0 | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG-9.0.0 b/CHANGELOG-9.0.0 index ca2818c..11e605d 100644 --- a/CHANGELOG-9.0.0 +++ b/CHANGELOG-9.0.0 @@ -13,7 +13,6 @@ Changes with Apache Traffic Server 9.0.0 #3925 - Enforce sphinx>=1.7.5 when building docs #3930 - Remove proxy.config.config_dir from records.config #3941 - Fix RecConfigReadPluginDir and clean up RecCore - #3943 - Handle response parsing case where EOF happens before any data arrives. #3951 - Fixed broken sphinx version check on MacOS #3955 - IntrusiveHashMap: Refresh TSHashTable for C++ eleventy. #3957 - Add generic "guard" class (PostScript) for exception and early function return safety. @@ -784,15 +783,16 @@ Changes with Apache Traffic Server 9.0.0 #6281 - Perf: replace dynamic_cast with static_cast in this_thread() #6283 - Adjust debug tag for ssl_sni_whitelist plugin to match plugin #6284 - Removes the remaining references to TSQA + #6287 - Introduce NetEvent to split UnixNetVConnection and NetHandler #6293 - Add invalid config warning when cache open write fail and read retry are inconsistent #6297 - Add links to RWW sections #6303 - Fixes a case where the NextHop consistent hash ring may not be completely searched. + #6315 - Fix closed flag from #6287 #6324 - Fixes clang-format issues #6325 - Fixes typo in TLS Bridge illustration #6329 - Fixed build issues on macOS after 0-RTT merge #6333 - XDebug: Always append to the X- header, rather than prepend #6339 - Fixes an issue where NextHopSelectionStrategy did not implement a parent check. - #6340 - Add header rewrite test to make sure we are not injecting end of rule char #6347 - Fix localstatedir and runtimedir for Debian layout #6358 - Add header guard - issue #6357 #6359 - Cleanup: Remove unused accessors of HttpVCTableEntry @@ -816,6 +816,7 @@ Changes with Apache Traffic Server 9.0.0 #6411 - Updating the autest version pin to 1.7.4. #6414 - Traffic Dump: fix client request target parsing #6421 - Add config option to enable/disable dynamic plugin reload feature + #6424 - SSL: Introduce proxy.config.ssl.server.session_ticket.number #6431 - #6428 Clear stale captive_action during Cache read retry - WIP (in test) #6432 - SSL: Introduce proxy.config.ssl.server.prioritize_chacha #6435 - Fixed chunked_encoding test to work with OpenSSL 1.0.2 @@ -882,15 +883,25 @@ Changes with Apache Traffic Server 9.0.0 #6664 - cache_range_requests: remove unnecessary Last-Modified header from tests #6677 - Format to match perferred if/else formatting for sh scripts #6678 - Removes commented out code from example + #6682 - Lua Plugin - Extend the crypto API with SHA-256 and HMAC functions. #6690 - Remove tls_versions from host sni policy check #6694 - Normalizes function names to match hook names in intercept plugins #6697 - Increase the default max_record_entries to match the original value #6700 - traffic_dump: add nullptr check for sni string #6704 - Removes ATS version from gold files - #6708 - Adding logging fields for collapsed forwarding metrics #6714 - Add Access log fields for ProxyProtocol Context #6717 - Fixup .gitignores to match repo reality #6718 - gcc10: fixed warning about returning local variable in int64_to_str() #6723 - Document ip_allow in sni.yaml + #6730 - Add HttpTransact::get_max_age and TSHttpTxnGetMaxAge #6731 - Fix g++ 10 compile errors. #6734 - Update expired test certificates for cert_update + #6740 - Cleans up doubled words in documentation + #6742 - gcc10: fixed clearing an object of non-trivial type for wccp + #6754 - Enforce Active Connection limits + #6755 - Add metrics to track default inactivity timed out connections + #6757 - ASAN: Fixed one definition rule violation + #6770 - Weird characters in debug message + #6772 - Ensure inactivity timeout is not set when passed in timeout value is 0 + #6774 - Fixed `AddressSanitizer: odr-violation` + #6781 - 1. Set a non-zero default value for TLS Client Handshake Timeout
[trafficserver] branch 9.0.x updated (ff6c5da -> d9cee2c)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a change to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from ff6c5da clang-analyzer: Fix dead nested assignment issues add d9cee2c Removed the trailing whitespaces, also fixed PRs No new revisions were added by this update. Summary of changes: CHANGELOG-9.0.0 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
[trafficserver] branch 7.1.x updated: updated clang-format
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 7.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/7.1.x by this push: new 4c4b74d updated clang-format 4c4b74d is described below commit 4c4b74dd08349962ab004713453643bae180a553 Author: Leif Hedstrom AuthorDate: Thu May 14 16:05:15 2020 -0600 updated clang-format --- cmd/traffic_top/stats.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/traffic_top/stats.h b/cmd/traffic_top/stats.h index 8fdcc00..f52653f 100644 --- a/cmd/traffic_top/stats.h +++ b/cmd/traffic_top/stats.h @@ -60,7 +60,7 @@ const char end[] = "\",\n"; // class Stats { - using string= std::string; + using string = std::string; template using map = std::map; public: @@ -495,11 +495,11 @@ public: } private: - std::pair - make_pair(std::string s, LookupItem i) - { - return std::make_pair(s, i); - } + std::pair + make_pair(std::string s, LookupItem i) + { +return std::make_pair(s, i); + } map *_stats; map *_old_stats;
[trafficserver] branch 9.0.x updated: clang-analyzer: Fix dead nested assignment issues
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new ff6c5da clang-analyzer: Fix dead nested assignment issues ff6c5da is described below commit ff6c5da7968508f09ddcbcac02d9bef7f2cb0d73 Author: Masakazu Kitajo AuthorDate: Wed May 13 17:30:01 2020 +0900 clang-analyzer: Fix dead nested assignment issues (cherry picked from commit 9c88bb74755ecd18eb9e16a91cc8bfbdcf7b83b9) --- iocore/dns/DNSConnection.cc| 2 +- iocore/net/Connection.cc | 25 +++--- iocore/net/UnixUDPNet.cc | 31 + mgmt/api/EventControlMain.cc | 2 +- plugins/esi/esi.cc | 8 ++--- .../experimental/access_control/access_control.cc | 2 +- plugins/experimental/mp4/mp4_meta.cc | 4 +-- proxy/http/remap/RemapConfig.cc| 4 +-- tools/jtest/jtest.cc | 39 +++--- 9 files changed, 57 insertions(+), 60 deletions(-) diff --git a/iocore/dns/DNSConnection.cc b/iocore/dns/DNSConnection.cc index 5462156..1f2dab6 100644 --- a/iocore/dns/DNSConnection.cc +++ b/iocore/dns/DNSConnection.cc @@ -157,7 +157,7 @@ DNSConnection::connect(sockaddr const *addr, Options const ) p = static_cast((p % (LAST_RANDOM_PORT - FIRST_RANDOM_PORT)) + FIRST_RANDOM_PORT); ats_ip_port_cast(_addr.sa) = htons(p); // stuff port in sockaddr. Debug("dns", "random port = %s", ats_ip_nptop(_addr.sa, b, sizeof b)); - if ((res = socketManager.ink_bind(fd, _addr.sa, bind_size, Proto)) < 0) { + if (socketManager.ink_bind(fd, _addr.sa, bind_size, Proto) < 0) { continue; } goto Lok; diff --git a/iocore/net/Connection.cc b/iocore/net/Connection.cc index 99c1088..4f5395c 100644 --- a/iocore/net/Connection.cc +++ b/iocore/net/Connection.cc @@ -192,7 +192,7 @@ Server::setup_fd_for_listen(bool non_blocking, const NetProcessor::AcceptOptions } } - if ((res = safe_fcntl(fd, F_SETFD, FD_CLOEXEC)) < 0) { + if (safe_fcntl(fd, F_SETFD, FD_CLOEXEC) < 0) { goto Lerror; } @@ -201,44 +201,44 @@ Server::setup_fd_for_listen(bool non_blocking, const NetProcessor::AcceptOptions l.l_onoff = 0; l.l_linger = 0; if ((opt.sockopt_flags & NetVCOptions::SOCK_OPT_LINGER_ON) && -(res = safe_setsockopt(fd, SOL_SOCKET, SO_LINGER, reinterpret_cast(), sizeof(l))) < 0) { +safe_setsockopt(fd, SOL_SOCKET, SO_LINGER, reinterpret_cast(), sizeof(l)) < 0) { goto Lerror; } } - if (ats_is_ip6() && (res = safe_setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, SOCKOPT_ON, sizeof(int))) < 0) { + if (ats_is_ip6() && safe_setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, SOCKOPT_ON, sizeof(int)) < 0) { goto Lerror; } - if ((res = safe_setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, SOCKOPT_ON, sizeof(int))) < 0) { + if (safe_setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, SOCKOPT_ON, sizeof(int)) < 0) { goto Lerror; } REC_ReadConfigInteger(listen_per_thread, "proxy.config.exec_thread.listen"); if (listen_per_thread == 1) { -if ((res = safe_setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, SOCKOPT_ON, sizeof(int))) < 0) { +if (safe_setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, SOCKOPT_ON, sizeof(int)) < 0) { goto Lerror; } #ifdef SO_REUSEPORT_LB -if ((res = safe_setsockopt(fd, SOL_SOCKET, SO_REUSEPORT_LB, SOCKOPT_ON, sizeof(int))) < 0) { +if (safe_setsockopt(fd, SOL_SOCKET, SO_REUSEPORT_LB, SOCKOPT_ON, sizeof(int)) < 0) { goto Lerror; } #endif } if ((opt.sockopt_flags & NetVCOptions::SOCK_OPT_NO_DELAY) && - (res = safe_setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, SOCKOPT_ON, sizeof(int))) < 0) { + safe_setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, SOCKOPT_ON, sizeof(int)) < 0) { goto Lerror; } // enables 2 hour inactivity probes, also may fix IRIX FIN_WAIT_2 leak if ((opt.sockopt_flags & NetVCOptions::SOCK_OPT_KEEP_ALIVE) && - (res = safe_setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, SOCKOPT_ON, sizeof(int))) < 0) { + safe_setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, SOCKOPT_ON, sizeof(int)) < 0) { goto Lerror; } #ifdef TCP_FASTOPEN if ((opt.sockopt_flags & NetVCOptions::SOCK_OPT_TCP_FAST_OPEN) && - (res = safe_setsockopt(fd, IPPROTO_TCP, TCP_FASTOPEN, (char *)_queue_length, sizeof(int { + safe_setsockopt(fd, IPPROTO_TCP, TCP_FASTOPEN, (char *)_queue_length, sizeof(int))) { goto Lerror; } #endif @@ -260,8 +260,7 @@ Server::setup_fd_for_listen(bool non_blocking, const NetProcessor::AcceptOptions #if defined(TCP_MAXSEG) if (NetProcessor::accept_mss > 0) { -if ((res = safe_setsockopt(fd, IPPROTO_TCP, TCP_MAXSEG,
[trafficserver] branch 8.1.x updated: Updated ChangeLog
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 8.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.1.x by this push: new f5b5609 Updated ChangeLog f5b5609 is described below commit f5b560936fb09357cdb3174208f95533e765ca36 Author: Leif Hedstrom AuthorDate: Thu May 14 17:20:01 2020 -0600 Updated ChangeLog --- CHANGELOG-8.1.0 | 7 +++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG-8.1.0 b/CHANGELOG-8.1.0 index dbbc6e8..c756095 100644 --- a/CHANGELOG-8.1.0 +++ b/CHANGELOG-8.1.0 @@ -1,5 +1,6 @@ Changes with Apache Traffic Server 8.1.0 #3899 - Add a --reason tag option to the host subcommand + #3943 - Handle response parsing case where EOF happens before any data arrives. #4028 - proxy.config.http.connect_attempts_timeout tracks TTBF instead of connect #4055 - Remove ignore_keep_alive method entirely #4164 - Reset the inactivity timeout when reusing connections @@ -128,6 +129,7 @@ Changes with Apache Traffic Server 8.1.0 #6328 - Document the order of the X-Cache header #6332 - Fixes Issue #6321 caused when proxy.config.http.no_dns_just_forward_to_parent #6337 - Perf: Optimize sending HTTP/2 frame + #6340 - Add header rewrite test to make sure we are not injecting end of rule char #6343 - Fixes an assertion failure when proxy.config.http.no_dns_just_forward_to_parent is enabled #6346 - Fix heap-use-after-free on Http2Stream::destroy() #6348 - Add virtual destructors for Http2TxFrame, Http2FrequencyCounter @@ -159,6 +161,7 @@ Changes with Apache Traffic Server 8.1.0 #6582 - Fix strict round robin cur_index increment #6584 - Backport of all uri signing commits from master to 8.1.x #6585 - url_sig: fix memory leak with urlParse and pristine flag (8.1.x) + #6589 - Fix crash when following redirect #6593 - Back port of slice plugin to 8.1.x #6594 - Remove extra new line detection in 303 gold file #6595 - Fix httpbin autest for 8.1.x @@ -181,4 +184,8 @@ Changes with Apache Traffic Server 8.1.0 #6685 - 8.1.x backport cache_range_requests autests: remove last-modified #6688 - Fixes minor memory leak in configure_net #6692 - Fix deprecated-copy warning in cache tool + #6708 - Adding logging fields for collapsed forwarding metrics #6729 - Fix a bug that current_active_client_connections doesn't decrease + #6750 - backports parent.config ignore_self_detect flag to 8.1.x + #6756 - Correct `schedule_every_local` to schedule locally + #6779 - 8.1.x backport: header_rewrite: this fixes parsing where the [ ] section gets merged into values
[trafficserver] branch 8.1.x updated: Add header rewrite test to make sure we are not injecting end of rule char (#6340)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 8.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.1.x by this push: new 794bcc8 Add header rewrite test to make sure we are not injecting end of rule char (#6340) 794bcc8 is described below commit 794bcc87c13cea20d0b00b1cf13452ac8a151a41 Author: Evan Zelkowitz AuthorDate: Thu Jan 30 14:51:51 2020 -0700 Add header rewrite test to make sure we are not injecting end of rule char (#6340) * Add header rewrite test to make sure we are not injecting end of rule characters in to an actual header This is a regression check for the issue fixed in #5423 (cherry picked from commit a2e77e9db166b40c19240f0a1b64d302a711b74b) --- .../gold/header_rewrite-l_value.gold | 16 ++ .../header_rewrite/header_rewrite_l_value.test.py | 64 ++ .../header_rewrite/rules/rule_l_value.conf | 21 +++ 3 files changed, 101 insertions(+) diff --git a/tests/gold_tests/pluginTest/header_rewrite/gold/header_rewrite-l_value.gold b/tests/gold_tests/pluginTest/header_rewrite/gold/header_rewrite-l_value.gold new file mode 100644 index 000..8c3cf66 --- /dev/null +++ b/tests/gold_tests/pluginTest/header_rewrite/gold/header_rewrite-l_value.gold @@ -0,0 +1,16 @@ +`` +> GET http://www.example.com`` +> Host: www.example.com`` +> User-Agent: curl/`` +> Accept: */* +`` +< HTTP/1.1 200 OK +< Date: `` +< Age: `` +< Transfer-Encoding: chunked +< Proxy-Connection: keep-alive +< Server: ATS/`` +< X-First: First +< X-Last: Last +< +`` diff --git a/tests/gold_tests/pluginTest/header_rewrite/header_rewrite_l_value.test.py b/tests/gold_tests/pluginTest/header_rewrite/header_rewrite_l_value.test.py new file mode 100644 index 000..28247b0 --- /dev/null +++ b/tests/gold_tests/pluginTest/header_rewrite/header_rewrite_l_value.test.py @@ -0,0 +1,64 @@ +''' +''' +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +Test.Summary = ''' +Test for a regression of the issue fixed in +https://github.com/apache/trafficserver/pull/5423 +Insertion of header rewrite directives in to the output +''' + +Test.ContinueOnFail = True +# Define default ATS +ts = Test.MakeATSProcess("ts") +server = Test.MakeOriginServer("server") + +Test.testName = "" +request_header = {"headers": "GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n", "timestamp": "1469733493.993", "body": ""} +# expected response from the origin server +response_header = {"headers": "HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n", "timestamp": "1469733493.993", "body": ""} + +# add response to the server dictionary +server.addResponse("sessionfile.log", request_header, response_header) +ts.Disk.records_config.update({ +'proxy.config.diags.debug.enabled': 1, +'proxy.config.diags.debug.tags': 'header.*', +}) + +# The following rule adds X-First and X-Last headers +ts.Setup.CopyAs('rules/rule_l_value.conf', Test.RunDirectory) + +ts.Disk.plugin_config.AddLine( +'header_rewrite.so {0}/rule_l_value.conf'.format(Test.RunDirectory) +) +ts.Disk.remap_config.AddLine( +'map http://www.example.com http://127.0.0.1:{0}'.format(server.Variables.Port) +) +ts.Disk.remap_config.AddLine( +'map http://www.example.com:8080 http://127.0.0.1:{0}'.format(server.Variables.Port) +) + +# [L] test +tr = Test.AddTestRun("Header Rewrite End [L]") +tr.Processes.Default.Command = 'curl --proxy 127.0.0.1:{0} "http://www.example.com; -H "Proxy-Connection: keep-alive" --verbose'.format( +ts.Variables.port) +tr.Processes.Default.ReturnCode = 0 +tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) +tr.Processes.Default.Streams.stderr = "gold/header_rewrite-l_value.gold" +tr.StillRunningAfter = server +ts.Streams.All = "gold/header_rewrite-tag.gold" diff --git a/tests/gold_tests/pluginTest/header_rewrite/rules/rule_l_value.conf b/tests/gold_tests/pluginTest/header_rewrite/rules/rule_l_value.conf new file mode 100644 index 000..e80a8e4 --- /dev/null +++
[trafficserver] 02/03: Fix closed flag from #6287
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 7a1459df908f4af7ec7d76d46da91d19d3f0df4d Author: scw00 AuthorDate: Thu Jan 9 09:20:41 2020 +0800 Fix closed flag from #6287 (cherry picked from commit bd72eae870a0ccb83952f187f1f2700b28d3bb5c) --- iocore/net/NetEvent.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iocore/net/NetEvent.h b/iocore/net/NetEvent.h index a062e86..2a0e8ac 100644 --- a/iocore/net/NetEvent.h +++ b/iocore/net/NetEvent.h @@ -62,7 +62,7 @@ public: NetState read{}; NetState write{}; - bool closed= false; + int closed = 0; NetHandler *nh = nullptr; ink_hrtime inactivity_timeout_in = 0;
[trafficserver] branch 9.0.x updated (9167446 -> 5cb1141)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a change to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 9167446 Correct `schedule_every_local` to schedule locally new 2b0d475 Introduce NetEvent to split UnixNetVConnection and NetHandler new 7a1459d Fix closed flag from #6287 new 5cb1141 Add metrics to track default inactivity timed out connections (#6755) The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../monitoring/statistics/core/network-io.en.rst | 7 + iocore/net/I_NetVConnection.h | 4 +- iocore/net/Net.cc | 6 +- iocore/net/NetEvent.h | 96 ++ iocore/net/P_Net.h | 3 +- iocore/net/P_UnixNet.h | 198 ++-- iocore/net/P_UnixNetState.h| 6 +- iocore/net/P_UnixNetVConnection.h | 77 +++-- iocore/net/QUICNetVConnection.cc | 2 +- iocore/net/UnixNet.cc | 331 +++-- iocore/net/UnixNetPages.cc | 12 +- iocore/net/UnixNetVConnection.cc | 38 ++- proxy/PluginVC.cc | 12 + proxy/PluginVC.h | 2 + 14 files changed, 480 insertions(+), 314 deletions(-) create mode 100644 iocore/net/NetEvent.h
[trafficserver] 03/03: Add metrics to track default inactivity timed out connections (#6755)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 5cb1141821193b802b5ecb89d1f0baf25011016a Author: Sudheer Vinukonda AuthorDate: Tue May 12 15:14:36 2020 -0700 Add metrics to track default inactivity timed out connections (#6755) (cherry picked from commit 66f23063e1cb44ec04136853952dc299303a832d) --- .../monitoring/statistics/core/network-io.en.rst | 7 +++ iocore/net/I_NetVConnection.h | 4 +++- iocore/net/Net.cc | 6 -- iocore/net/NetEvent.h | 6 +- iocore/net/P_Net.h| 3 ++- iocore/net/P_UnixNetVConnection.h | 2 ++ iocore/net/UnixNet.cc | 12 iocore/net/UnixNetVConnection.cc | 19 +++ proxy/PluginVC.cc | 12 proxy/PluginVC.h | 2 ++ 10 files changed, 64 insertions(+), 9 deletions(-) diff --git a/doc/admin-guide/monitoring/statistics/core/network-io.en.rst b/doc/admin-guide/monitoring/statistics/core/network-io.en.rst index 8b83253..3777359 100644 --- a/doc/admin-guide/monitoring/statistics/core/network-io.en.rst +++ b/doc/admin-guide/monitoring/statistics/core/network-io.en.rst @@ -70,7 +70,14 @@ Network I/O :type: counter .. ts:stat:: global proxy.process.net.default_inactivity_timeout_applied integer + The total number of connections that had no transaction or connection level timer running on them and + had to fallback to the catch-all 'default_inactivity_timeout' + :type: counter .. ts:stat:: global proxy.process.net.default_inactivity_timeout_count integer + The total number of connections that were cleaned up due to 'default_inactivity_timeout' + :type: counter + +.. ts:stat:: global proxy.process.net.dynamic_keep_alive_timeout_in_count integer .. ts:stat:: global proxy.process.net.dynamic_keep_alive_timeout_in_total integer .. ts:stat:: global proxy.process.net.inactivity_cop_lock_acquire_failure integer .. ts:stat:: global proxy.process.net.net_handler_run integer diff --git a/iocore/net/I_NetVConnection.h b/iocore/net/I_NetVConnection.h index 7081af0..1b35a1d 100644 --- a/iocore/net/I_NetVConnection.h +++ b/iocore/net/I_NetVConnection.h @@ -539,7 +539,9 @@ public: is currently active. See section on timeout semantics above. */ - virtual void set_inactivity_timeout(ink_hrtime timeout_in) = 0; + virtual void set_inactivity_timeout(ink_hrtime timeout_in) = 0; + virtual void set_default_inactivity_timeout(ink_hrtime timeout_in) = 0; + virtual bool is_default_inactivity_timeout() = 0; /** Clears the active timeout. No active timeouts will be sent until diff --git a/iocore/net/Net.cc b/iocore/net/Net.cc index 1813c0d..2ee21f9 100644 --- a/iocore/net/Net.cc +++ b/iocore/net/Net.cc @@ -102,7 +102,8 @@ register_net_stats() const std::pair non_persistent[] = { {"proxy.process.net.accepts_currently_open", net_accepts_currently_open_stat}, {"proxy.process.net.connections_currently_open", net_connections_currently_open_stat}, -{"proxy.process.net.default_inactivity_timeout_applied", default_inactivity_timeout_stat}, +{"proxy.process.net.default_inactivity_timeout_applied", default_inactivity_timeout_applied_stat}, +{"proxy.process.net.default_inactivity_timeout_count", default_inactivity_timeout_count_stat}, {"proxy.process.net.dynamic_keep_alive_timeout_in_count", keep_alive_queue_timeout_count_stat}, {"proxy.process.net.dynamic_keep_alive_timeout_in_total", keep_alive_queue_timeout_total_stat}, {"proxy.process.socks.connections_currently_open", socks_connections_currently_open_stat}, @@ -130,7 +131,8 @@ register_net_stats() NET_CLEAR_DYN_STAT(socks_connections_currently_open_stat); NET_CLEAR_DYN_STAT(keep_alive_queue_timeout_total_stat); NET_CLEAR_DYN_STAT(keep_alive_queue_timeout_count_stat); - NET_CLEAR_DYN_STAT(default_inactivity_timeout_stat); + NET_CLEAR_DYN_STAT(default_inactivity_timeout_count_stat); + NET_CLEAR_DYN_STAT(default_inactivity_timeout_applied_stat); RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.tcp.total_accepts", RECD_INT, RECP_NON_PERSISTENT, static_cast(net_tcp_accept_stat), RecRawStatSyncSum); diff --git a/iocore/net/NetEvent.h b/iocore/net/NetEvent.h index 2a0e8ac..94e96fe 100644 --- a/iocore/net/NetEvent.h +++ b/iocore/net/NetEvent.h @@ -45,7 +45,9 @@ public: // Duplicate with `NetVConnection::set_inactivity_timeout` // TODO: more abstraction. - virtual void set_inactivity_timeout(ink_hrtime timeout_in) = 0; + virtual void set_inactivity_timeout(ink_hrtime timeout_in) = 0; + virtual void
[trafficserver] 01/03: Introduce NetEvent to split UnixNetVConnection and NetHandler
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 2b0d475965d01d38726917f4a309c19f6012288e Author: scw00 AuthorDate: Mon Dec 23 14:24:25 2019 +0800 Introduce NetEvent to split UnixNetVConnection and NetHandler (cherry picked from commit f630275694d58882c21e8c4ce180f95e9edd4ebd) --- iocore/net/NetEvent.h | 92 +++ iocore/net/P_UnixNet.h| 198 +++ iocore/net/P_UnixNetState.h | 6 +- iocore/net/P_UnixNetVConnection.h | 75 + iocore/net/QUICNetVConnection.cc | 2 +- iocore/net/UnixNet.cc | 319 +++--- iocore/net/UnixNetPages.cc| 12 +- iocore/net/UnixNetVConnection.cc | 19 ++- 8 files changed, 417 insertions(+), 306 deletions(-) diff --git a/iocore/net/NetEvent.h b/iocore/net/NetEvent.h new file mode 100644 index 000..a062e86 --- /dev/null +++ b/iocore/net/NetEvent.h @@ -0,0 +1,92 @@ +/** @file + + A brief file description + + @section license License + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#pragma once + +#include "I_EventSystem.h" + +class NetHandler; + +// this class is used to NetHandler to hide some detail of NetEvent. +// To combine the `UDPConenction` and `NetEvent`. NetHandler should +// callback to net_read_io or net_write_io when net event happen. +class NetEvent +{ +public: + NetEvent() = default; + virtual ~NetEvent() {} + virtual void net_read_io(NetHandler *nh, EThread *lthread) = 0; + virtual void net_write_io(NetHandler *nh, EThread *lthread) = 0; + virtual void free(EThread *t) = 0; + + // since we want this class to be independent from VConnection, Continutaion. There should be + // a pure virtual function which connect sub class and NetHandler. + virtual int callback(int event = CONTINUATION_EVENT_NONE, void *data = nullptr) = 0; + + // Duplicate with `NetVConnection::set_inactivity_timeout` + // TODO: more abstraction. + virtual void set_inactivity_timeout(ink_hrtime timeout_in) = 0; + + // get this vc's thread + virtual EThread *get_thread() = 0; + + // Close when EventIO close; + virtual int close() = 0; + + // get fd + virtual int get_fd() = 0; + virtual Ptr _mutex() = 0; + virtual ContFlags _control_flags() = 0; + + EventIO ep{}; + NetState read{}; + NetState write{}; + + bool closed= false; + NetHandler *nh = nullptr; + + ink_hrtime inactivity_timeout_in = 0; + ink_hrtime active_timeout_in = 0; + ink_hrtime next_inactivity_timeout_at = 0; + ink_hrtime next_activity_timeout_at = 0; + ink_hrtime submit_time= 0; + + LINK(NetEvent, open_link); + LINK(NetEvent, cop_link); + LINKM(NetEvent, read, ready_link) + SLINKM(NetEvent, read, enable_link) + LINKM(NetEvent, write, ready_link) + SLINKM(NetEvent, write, enable_link) + LINK(NetEvent, keep_alive_queue_link); + LINK(NetEvent, active_queue_link); + + union { +unsigned int flags = 0; +#define NET_VC_SHUTDOWN_READ 1 +#define NET_VC_SHUTDOWN_WRITE 2 +struct { + unsigned int got_local_addr : 1; + unsigned int shutdown : 2; +} f; + }; +}; diff --git a/iocore/net/P_UnixNet.h b/iocore/net/P_UnixNet.h index 91ccb6f..800be6b 100644 --- a/iocore/net/P_UnixNet.h +++ b/iocore/net/P_UnixNet.h @@ -75,7 +75,7 @@ struct PollDescriptor; typedef PollDescriptor *EventLoop; -class UnixNetVConnection; +class NetEvent; class UnixUDPConnection; struct DNSConnection; struct NetAccept; @@ -89,14 +89,14 @@ struct EventIO { int type = 0; union { Continuation *c; -UnixNetVConnection *vc; +NetEvent *ne; DNSConnection *dnscon; NetAccept *na; UnixUDPConnection *uc; } data; int start(EventLoop l, DNSConnection *vc, int events); int start(EventLoop l, NetAccept *vc, int events); - int start(EventLoop l, UnixNetVConnection *vc, int events); + int start(EventLoop l, NetEvent *ne, int events); int start(EventLoop l, UnixUDPConnection *vc, int events); int start(EventLoop l, int fd, Continuation *c, int events); // Change the
[trafficserver] branch 9.0.x updated: Add metrics to track default inactivity timed out connections (#6755)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new 4582cbe Add metrics to track default inactivity timed out connections (#6755) 4582cbe is described below commit 4582cbe69978c6bb9bdd83f209f76f0628231170 Author: Sudheer Vinukonda AuthorDate: Tue May 12 15:14:36 2020 -0700 Add metrics to track default inactivity timed out connections (#6755) (cherry picked from commit 66f23063e1cb44ec04136853952dc299303a832d) --- iocore/net/UnixNetVConnection.cc | 15 +++ 1 file changed, 15 insertions(+) diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc index 181420e..4981958 100644 --- a/iocore/net/UnixNetVConnection.cc +++ b/iocore/net/UnixNetVConnection.cc @@ -1371,6 +1371,21 @@ UnixNetVConnection::is_default_inactivity_timeout() return (default_inactivity_timeout && inactivity_timeout_in == 0); } +TS_INLINE void +UnixNetVConnection::set_default_inactivity_timeout(ink_hrtime timeout_in) +{ + Debug("socket", "Set default inactive timeout=%" PRId64 ", for NetVC=%p", timeout_in, this); + inactivity_timeout_in = 0; + default_inactivity_timeout = true; + next_inactivity_timeout_at = Thread::get_hrtime() + timeout_in; +} + +TS_INLINE bool +UnixNetVConnection::is_default_inactivity_timeout() +{ + return (default_inactivity_timeout && inactivity_timeout_in == 0); +} + /* * Close down the current netVC. Save aside the socket and SSL information * and create new netVC in the current thread/netVC
[trafficserver] branch 9.0.x updated: Fix crash when folloing redirect
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new b72c859 Fix crash when folloing redirect b72c859 is described below commit b72c8597757f0e93d3d5c080d56115ec1afefed9 Author: YuanYingdong <1975643...@qq.com> AuthorDate: Wed Mar 25 20:45:10 2020 +0800 Fix crash when folloing redirect When doing redirect and get cache read miss, we need to get cache write lock first other than directly do cache write directly. (cherry picked from commit 36ebb2d2a5cfdf794ea2661ed5f6e55090918d81) --- proxy/http/HttpSM.cc | 7 +++ proxy/http/HttpTransact.cc | 7 ++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index 9ec1d73..0065775 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -7843,10 +7843,9 @@ HttpSM::redirect_request(const char *arg_redirect_url, const int arg_redirect_le // will do that in handle_api_return under the // HttpTransact::SM_ACTION_REDIRECT_READ state t_state.parent_result.reset(); - t_state.request_sent_time = 0; - t_state.response_received_time = 0; - t_state.cache_info.write_lock_state = HttpTransact::CACHE_WL_INIT; - t_state.next_action = HttpTransact::SM_ACTION_REDIRECT_READ; + t_state.request_sent_time = 0; + t_state.response_received_time = 0; + t_state.next_action= HttpTransact::SM_ACTION_REDIRECT_READ; // we have a new OS and need to have DNS lookup the new OS t_state.dns_info.lookup_success = false; t_state.force_dns = false; diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index a0e8ed5..8bfa521 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -2088,7 +2088,12 @@ HttpTransact::DecideCacheLookup(State *s) if (s->redirect_info.redirect_in_process) { // without calling out the CACHE_LOOKUP_COMPLETE_HOOK if (s->txn_conf->cache_http) { -s->cache_info.action = CACHE_DO_WRITE; +if (s->cache_info.write_lock_state == CACHE_WL_FAIL) { + s->cache_info.action = CACHE_PREPARE_TO_WRITE; + s->cache_info.write_lock_state = HttpTransact::CACHE_WL_INIT; +} else if (s->cache_info.write_lock_state == CACHE_WL_SUCCESS) { + s->cache_info.action = CACHE_DO_WRITE; +} } LookupSkipOpenServer(s); } else {
[trafficserver] branch 8.1.x updated (794bcc8 -> 685fe59)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a change to branch 8.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 794bcc8 Add header rewrite test to make sure we are not injecting end of rule char (#6340) add 685fe59 Fix crash when folloing redirect No new revisions were added by this update. Summary of changes: proxy/http/HttpSM.cc | 7 +++ proxy/http/HttpTransact.cc | 7 ++- 2 files changed, 9 insertions(+), 5 deletions(-)
[trafficserver] branch 9.0.x updated: Fixed `AddressSanitizer: odr-violation`
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new 59663bd Fixed `AddressSanitizer: odr-violation` 59663bd is described below commit 59663bd30291ea9809491f696ea5e85f3c574446 Author: Gancho Tenev AuthorDate: Wed May 13 18:00:42 2020 -0700 Fixed `AddressSanitizer: odr-violation` Fixed ODR violation in test_RemapPluginInfo when using test plugin plugin_testing_calls.so. Also fixed a typo in specifying plugin factory build dependencies. (cherry picked from commit 02e8d5eaf90dc4d118c770585827c9a1485e8d73) --- proxy/http/remap/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/proxy/http/remap/Makefile.am b/proxy/http/remap/Makefile.am index c569801..af15a57 100644 --- a/proxy/http/remap/Makefile.am +++ b/proxy/http/remap/Makefile.am @@ -93,7 +93,7 @@ test_PluginFactory_CPPFLAGS = $(AM_CPPFLAGS) -I$(abs_top_srcdir)/tests/include - test_PluginFactory_LIBTOOLFLAGS = --preserve-dup-deps EXTRA_test_PluginFactory_DEPENDENCIES = \ unit-tests/plugin_v1.la \ - unit-tests/plugin_init_fail.la + unit-tests/plugin_init_fail.la \ unit-tests/plugin_instinit_fail.la test_PluginFactory_LDADD = $(COMMON_PLUGINDSO_LDADDS) test_PluginFactory_LDFLAGS = $(AM_LDFLAGS) @@ -117,7 +117,6 @@ test_RemapPluginInfo_LDADD = $(COMMON_PLUGINDSO_LDADDS) test_RemapPluginInfo_LDFLAGS = $(AM_LDFLAGS) test_RemapPluginInfo_SOURCES = \ unit-tests/plugin_testing_common.cc \ - unit-tests/plugin_testing_calls.cc \ unit-tests/test_RemapPlugin.cc \ PluginDso.cc \ RemapPluginInfo.cc
[trafficserver] branch 9.0.x updated: Weird characters in debug message
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new 8505309 Weird characters in debug message 8505309 is described below commit 850530963ea9d9ee85b193901ef75063d0890bd2 Author: Bryan Call AuthorDate: Wed May 13 11:43:46 2020 -0700 Weird characters in debug message (cherry picked from commit 9f71a80ce4dd16aa59b3d32f5356209278a62bce) --- proxy/http/remap/PluginDso.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/http/remap/PluginDso.cc b/proxy/http/remap/PluginDso.cc index eb4a895..b743026 100644 --- a/proxy/http/remap/PluginDso.cc +++ b/proxy/http/remap/PluginDso.cc @@ -87,7 +87,7 @@ PluginDso::load(std::string ) std::error_code ec; fs::file_status fs = fs::status(_effectivePath, ec); _mtime = fs::modification_time(fs); - PluginDebug(_tag, "plugin '%s' mоdification time %ld", _configPath.c_str(), _mtime); + PluginDebug(_tag, "plugin '%s' modification time %ld", _configPath.c_str(), _mtime); /* Now attemt to load the plugin DSO */ if ((_dlh = dlopen(_runtimePath.c_str(), RTLD_NOW)) == nullptr) {
[trafficserver] branch master updated (1f5d674 -> 9f71a80)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 1f5d674 Add back reading config for handshake timeout (#6773) add 9f71a80 Weird characters in debug message No new revisions were added by this update. Summary of changes: proxy/http/remap/PluginDso.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[trafficserver] branch master updated (9f71a80 -> 02e8d5e)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 9f71a80 Weird characters in debug message add 02e8d5e Fixed `AddressSanitizer: odr-violation` No new revisions were added by this update. Summary of changes: proxy/http/remap/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)