You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by cm...@apache.org on 2024/03/05 15:33:24 UTC

(trafficserver) branch 10.0.x updated (5e6c7cdffe -> 6c5e0d84bc)

This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a change to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


    from 5e6c7cdffe Add libswoc unit tests (#11106)
     new 6ae8ccbd5a fix hostdb.host_file.interval to be set at reconfig time (#11104)
     new 53114fcc42 Fix package name in build system. (#11109)
     new 00fb00849d Only work around dup lib issue on appleclang (#11105)
     new aa8596307d Mute some coverity issues. (#11117)
     new c0e1046acd dont install static libraries (#11119)
     new 191cddf57c http3: Propagate edata as well (#11121)
     new 68332818ed rate_limit plugin: Decouple metrics and queue config (#11122)
     new 6c5e0d84bc test_ip: add iterator temporary for gcc release builds (#11124)

The 8 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:
 CMakeLists.txt                                     |  7 +++---
 include/proxy/http3/Http3Transaction.h             |  2 +-
 lib/swoc/unit_tests/test_ip.cc                     |  3 ++-
 plugins/experimental/rate_limit/limiter.h          | 14 ++++++------
 .../txn_box/plugin/include/txn_box/accl_util.h     |  2 +-
 src/api/CMakeLists.txt                             |  6 -----
 src/iocore/hostdb/HostDB.cc                        | 26 +++++++++++++---------
 src/iocore/hostdb/P_HostDBProcessor.h              |  3 ---
 src/proxy/http3/Http3Session.cc                    |  2 +-
 src/proxy/http3/Http3Transaction.cc                |  8 +++----
 src/tsutil/CMakeLists.txt                          | 14 +++++++-----
 11 files changed, 43 insertions(+), 44 deletions(-)


(trafficserver) 05/08: dont install static libraries (#11119)

Posted by cm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit c0e1046acd75c3fe138abc155bca9230de74e543
Author: Chris McFarlen <ch...@mcfarlen.us>
AuthorDate: Fri Mar 1 14:05:23 2024 -0600

    dont install static libraries (#11119)
    
    (cherry picked from commit 9e0b359c632190d01a948a9121d486fe15e8df61)
---
 src/api/CMakeLists.txt    |  6 ------
 src/tsutil/CMakeLists.txt | 14 ++++++++------
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/src/api/CMakeLists.txt b/src/api/CMakeLists.txt
index 9ed47c14c8..3a7f056235 100644
--- a/src/api/CMakeLists.txt
+++ b/src/api/CMakeLists.txt
@@ -51,12 +51,6 @@ install(
   PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ts
 )
 
-install(
-  TARGETS tsapibackend
-  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
-  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
-)
-
 if(APPLE)
   target_link_options(tsapi PRIVATE -undefined dynamic_lookup)
 endif()
diff --git a/src/tsutil/CMakeLists.txt b/src/tsutil/CMakeLists.txt
index a747431daa..0cd0ab8fd4 100644
--- a/src/tsutil/CMakeLists.txt
+++ b/src/tsutil/CMakeLists.txt
@@ -55,12 +55,14 @@ add_library(ts::tsutil ALIAS tsutil)
 set_target_properties(tsutil PROPERTIES POSITION_INDEPENDENT_CODE TRUE PUBLIC_HEADER "${TSUTIL_PUBLIC_HEADERS}")
 target_link_libraries(tsutil PUBLIC libswoc::libswoc yaml-cpp::yaml-cpp PkgConfig::PCRE2)
 
-install(
-  TARGETS tsutil
-  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
-  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
-  PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tsutil
-)
+if(BUILD_SHARED_LIBS)
+  install(
+    TARGETS tsutil
+    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+    PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tsutil
+  )
+endif()
 
 if(BUILD_TESTING)
   add_executable(


(trafficserver) 03/08: Only work around dup lib issue on appleclang (#11105)

Posted by cm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 00fb00849d4e68136e4efc3b355f1cdc60484aaf
Author: Chris McFarlen <ch...@mcfarlen.us>
AuthorDate: Mon Mar 4 17:31:32 2024 -0600

    Only work around dup lib issue on appleclang (#11105)
    
    Co-authored-by: Chris McFarlen <cm...@apple.com>
    (cherry picked from commit 12cbce5577268bdc53226fb59c1ba158ff71fd4b)
---
 CMakeLists.txt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3b50eb08e7..8ec664d50e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -521,9 +521,10 @@ if(HOST_OS STREQUAL "linux")
   link_libraries(dl)
 endif(HOST_OS STREQUAL "linux")
 
-if(HOST_OS STREQUAL "darwin")
+if(CMAKE_CXX_COMPILER_ID STREQUAL AppleClang)
   set(CMAKE_MACOSX_RPATH 1)
-endif(HOST_OS STREQUAL "darwin")
+  link_libraries("-ld_classic")
+endif()
 
 if(HOST_OS STREQUAL "freebsd")
   set(CMAKE_THREAD_LIBS_INIT "-lpthread")


(trafficserver) 07/08: rate_limit plugin: Decouple metrics and queue config (#11122)

Posted by cm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 68332818ed12535e2c3e60c511f56dc24cc3a44d
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Tue Mar 5 13:27:24 2024 +0900

    rate_limit plugin: Decouple metrics and queue config (#11122)
    
    (cherry picked from commit 0d84ded1181603e082141c7ba3b5d403e8e38025)
---
 plugins/experimental/rate_limit/limiter.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/plugins/experimental/rate_limit/limiter.h b/plugins/experimental/rate_limit/limiter.h
index 6f92f7e97c..73757450f4 100644
--- a/plugins/experimental/rate_limit/limiter.h
+++ b/plugins/experimental/rate_limit/limiter.h
@@ -95,16 +95,16 @@ public:
       if (queue["max_age"]) {
         _max_age = std::chrono::seconds(queue["max_age"].as<uint32_t>());
       }
+    }
 
-      const YAML::Node &metrics = node["metrics"];
+    const YAML::Node &metrics = node["metrics"];
 
-      if (metrics) {
-        std::string prefix = metrics["prefix"] ? metrics["prefix"].as<std::string>() : RATE_LIMITER_METRIC_PREFIX;
-        std::string tag    = metrics["tag"] ? metrics["tag"].as<std::string>() : name();
+    if (metrics) {
+      std::string prefix = metrics["prefix"] ? metrics["prefix"].as<std::string>() : RATE_LIMITER_METRIC_PREFIX;
+      std::string tag    = metrics["tag"] ? metrics["tag"].as<std::string>() : name();
 
-        Dbg(dbg_ctl, "Metrics for selector rule: %s(%s, %s)", name().c_str(), prefix.c_str(), tag.c_str());
-        initializeMetrics(RATE_LIMITER_TYPE_SNI, prefix, tag);
-      }
+      Dbg(dbg_ctl, "Metrics for selector rule: %s(%s, %s)", name().c_str(), prefix.c_str(), tag.c_str());
+      initializeMetrics(RATE_LIMITER_TYPE_SNI, prefix, tag);
     }
 
     return true;


(trafficserver) 08/08: test_ip: add iterator temporary for gcc release builds (#11124)

Posted by cm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 6c5e0d84bca14361dcb86ba970ee2fbded59724c
Author: Brian Olsen <br...@comcast.com>
AuthorDate: Mon Mar 4 09:42:25 2024 -0700

    test_ip: add iterator temporary for gcc release builds (#11124)
    
    (cherry picked from commit 7f32f4eba4c023971bbdd3e6d448480d3922a5d0)
---
 lib/swoc/unit_tests/test_ip.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/swoc/unit_tests/test_ip.cc b/lib/swoc/unit_tests/test_ip.cc
index bb7eadfc31..178e85b72a 100644
--- a/lib/swoc/unit_tests/test_ip.cc
+++ b/lib/swoc/unit_tests/test_ip.cc
@@ -1253,7 +1253,8 @@ TEST_CASE("IPSpace Edge", "[libswoc][ipspace][edge]") {
   auto &v1 = *spot;
   auto &p1 = get<1>(v1);
 
-  if (auto &&[r, p] = *(cspace.find(a1)); !r.empty()) {
+  auto const iter = cspace.find(a1);
+  if (auto &&[r, p] = *iter; !r.empty()) {
     static_assert(std::is_same_v<swoc::IPRangeView const &, decltype(r)>);
     IPRange rr = r;
     swoc::IPRangeView rvv{r};


(trafficserver) 01/08: fix hostdb.host_file.interval to be set at reconfig time (#11104)

Posted by cm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 6ae8ccbd5aec410efe9cf260bf4c21733c5b6069
Author: Chris McFarlen <ch...@mcfarlen.us>
AuthorDate: Mon Mar 4 17:31:15 2024 -0600

    fix hostdb.host_file.interval to be set at reconfig time (#11104)
    
    Co-authored-by: Chris McFarlen <cm...@apple.com>
    (cherry picked from commit 007caf8e72e73da885d3b3d9e7cc7125fbcf61d6)
---
 src/iocore/hostdb/HostDB.cc           | 26 +++++++++++++++-----------
 src/iocore/hostdb/P_HostDBProcessor.h |  3 ---
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/src/iocore/hostdb/HostDB.cc b/src/iocore/hostdb/HostDB.cc
index a1e8d32623..351dc70343 100644
--- a/src/iocore/hostdb/HostDB.cc
+++ b/src/iocore/hostdb/HostDB.cc
@@ -366,6 +366,21 @@ HostDBProcessor::init()
   REC_EstablishStaticConfigInt32U(hostdb_ip_fail_timeout_interval, "proxy.config.hostdb.fail.timeout");
   REC_EstablishStaticConfigInt32U(hostdb_serve_stale_but_revalidate, "proxy.config.hostdb.serve_stale_for");
   REC_EstablishStaticConfigInt32U(hostdb_round_robin_max_count, "proxy.config.hostdb.round_robin_max_count");
+  const char *interval_config = "proxy.config.hostdb.host_file.interval";
+  {
+    RecInt tmp_interval{};
+
+    REC_ReadConfigInteger(tmp_interval, interval_config);
+    hostdb_hostfile_check_interval = std::chrono::seconds(tmp_interval);
+  }
+  RecRegisterConfigUpdateCb(
+    interval_config,
+    [&](const char *, RecDataT, RecData data, void *) {
+      hostdb_hostfile_check_interval = std::chrono::seconds(data.rec_int);
+
+      return REC_ERR_OKAY;
+    },
+    nullptr);
 
   //
   // Initialize hostdb_current_timestamp which is our cached version of
@@ -376,7 +391,6 @@ HostDBProcessor::init()
   HostDBContinuation *b = hostDBContAllocator.alloc();
   SET_CONTINUATION_HANDLER(b, &HostDBContinuation::backgroundEvent);
   b->mutex = new_ProxyMutex();
-  b->updateHostFileConfig();
   eventProcessor.schedule_every(b, HRTIME_SECONDS(1), ET_DNS);
 
   return 0;
@@ -1330,15 +1344,6 @@ HostDBContinuation::do_dns()
   }
 }
 
-void
-HostDBContinuation::updateHostFileConfig()
-{
-  RecInt tmp_interval{};
-
-  REC_ReadConfigInteger(tmp_interval, "proxy.config.hostdb.host_file.interval");
-  hostdb_hostfile_check_interval = std::chrono::seconds(tmp_interval);
-}
-
 //
 // Background event
 // Increment the hostdb_current_timestamp which functions as our cached version
@@ -1360,7 +1365,6 @@ HostDBContinuation::backgroundEvent(int /* event ATS_UNUSED */, Event * /* e ATS
     bool update_p = false; // do we need to reparse the file and update?
     char path[PATH_NAME_MAX];
 
-    updateHostFileConfig();
     REC_ReadConfigString(path, "proxy.config.hostdb.host_file.path", sizeof(path));
     if (0 != strcasecmp(hostdb_hostfile_path.string(), path)) {
       Dbg(dbg_ctl_hostdb, "%s",
diff --git a/src/iocore/hostdb/P_HostDBProcessor.h b/src/iocore/hostdb/P_HostDBProcessor.h
index c47e37c0cf..c7652e2224 100644
--- a/src/iocore/hostdb/P_HostDBProcessor.h
+++ b/src/iocore/hostdb/P_HostDBProcessor.h
@@ -235,9 +235,6 @@ struct HostDBContinuation : public Continuation {
   int retryEvent(int event, Event *e);
   int setbyEvent(int event, Event *e);
 
-  // update the host file config variables
-  void updateHostFileConfig();
-
   /// Recompute the hash and update ancillary values.
   void refresh_hash();
   void do_dns();


(trafficserver) 04/08: Mute some coverity issues. (#11117)

Posted by cm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit aa8596307d3f311831de4dd8b2e581e55ecbc620
Author: Damian Meden <dm...@apache.org>
AuthorDate: Mon Mar 4 11:56:36 2024 +0100

    Mute some coverity issues. (#11117)
    
    CID 1534743, 1534741, 1534735, 1534715, 1534705
    
    (cherry picked from commit ad69650995a3b10fa01d97293de25710ac8620c5)
---
 plugins/experimental/txn_box/plugin/include/txn_box/accl_util.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/experimental/txn_box/plugin/include/txn_box/accl_util.h b/plugins/experimental/txn_box/plugin/include/txn_box/accl_util.h
index 1f214537f5..c45614ce80 100644
--- a/plugins/experimental/txn_box/plugin/include/txn_box/accl_util.h
+++ b/plugins/experimental/txn_box/plugin/include/txn_box/accl_util.h
@@ -128,7 +128,7 @@ private:
   /// hold the first element on the entire tree.
   node_type_ptr _head;
   /// this gets incremented on every insert.
-  int32_t _rank_counter;
+  int32_t _rank_counter{0};
   /// recursive memory cleanup function.
   void freeup(Node *n);
   /// clean up function, should deal with all the crap.


(trafficserver) 06/08: http3: Propagate edata as well (#11121)

Posted by cm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 191cddf57c5fd3b18bac747e54cd4599f9015866
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Mon Mar 4 10:54:42 2024 -0700

    http3: Propagate edata as well (#11121)
    
    (cherry picked from commit 1d58cd4512f65fe60a1fe8e6381c2f3227b5433f)
---
 include/proxy/http3/Http3Transaction.h | 2 +-
 src/proxy/http3/Http3Session.cc        | 2 +-
 src/proxy/http3/Http3Transaction.cc    | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/proxy/http3/Http3Transaction.h b/include/proxy/http3/Http3Transaction.h
index 3db3ac1d6d..8db5f09f07 100644
--- a/include/proxy/http3/Http3Transaction.h
+++ b/include/proxy/http3/Http3Transaction.h
@@ -84,7 +84,7 @@ protected:
   void _schedule_write_complete_event();
   void _unschedule_write_complete_event();
   void _close_write_complete_event(Event *e);
-  void _signal_event(int event);
+  void _signal_event(int event, Event *e);
   void _signal_read_event();
   void _signal_write_event();
   void _delete_if_possible();
diff --git a/src/proxy/http3/Http3Session.cc b/src/proxy/http3/Http3Session.cc
index 14ce9c18c4..48d8615735 100644
--- a/src/proxy/http3/Http3Session.cc
+++ b/src/proxy/http3/Http3Session.cc
@@ -164,7 +164,7 @@ HQSession::main_event_handler(int event, void *edata)
     this->do_io_close();
     for (HQTransaction *t = this->_transaction_list.head; t; t = static_cast<HQTransaction *>(t->link.next)) {
       SCOPED_MUTEX_LOCK(lock, t->mutex, this_ethread());
-      t->handleEvent(event);
+      t->handleEvent(event, edata);
     }
     break;
   }
diff --git a/src/proxy/http3/Http3Transaction.cc b/src/proxy/http3/Http3Transaction.cc
index a2c96ec23a..99953d5e49 100644
--- a/src/proxy/http3/Http3Transaction.cc
+++ b/src/proxy/http3/Http3Transaction.cc
@@ -346,15 +346,15 @@ HQTransaction::_close_write_complete_event(Event *e)
 }
 
 void
-HQTransaction::_signal_event(int event)
+HQTransaction::_signal_event(int event, Event *edata)
 {
   if (this->_write_vio.cont) {
     SCOPED_MUTEX_LOCK(lock, this->_write_vio.mutex, this_ethread());
-    this->_write_vio.cont->handleEvent(event);
+    this->_write_vio.cont->handleEvent(event, edata);
   }
   if (this->_read_vio.cont && this->_read_vio.cont != this->_write_vio.cont) {
     SCOPED_MUTEX_LOCK(lock, this->_read_vio.mutex, this_ethread());
-    this->_read_vio.cont->handleEvent(event);
+    this->_read_vio.cont->handleEvent(event, edata);
   }
 }
 
@@ -503,7 +503,7 @@ Http3Transaction::state_stream_open(int event, Event *edata)
   case VC_EVENT_INACTIVITY_TIMEOUT:
   case VC_EVENT_ACTIVE_TIMEOUT: {
     Http3TransVDebug("%s (%d)", get_vc_event_name(event), event);
-    this->_signal_event(event);
+    this->_signal_event(event, edata);
     break;
   }
   default:


(trafficserver) 02/08: Fix package name in build system. (#11109)

Posted by cm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 53114fcc42a59902a50453478ad509cf1305f95e
Author: Chris McFarlen <ch...@mcfarlen.us>
AuthorDate: Mon Mar 4 17:31:52 2024 -0600

    Fix package name in build system. (#11109)
    
    Co-authored-by: Chris McFarlen <cm...@apple.com>
    (cherry picked from commit 60a90630fda456be7ea93b6ef93d3bb5ba1f01f3)
---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 89506adbca..3b50eb08e7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -538,7 +538,7 @@ endif()
 set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${CMAKE_INSTALL_PREFIX}/lib64")
 set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
 
-add_compile_definitions(${HOST_OS} PACKAGE_NAME="ats" PACKAGE_VERSION="${TS_VERSION_STRING}")
+add_compile_definitions(${HOST_OS} PACKAGE_NAME="Apache Traffic Server" PACKAGE_VERSION="${TS_VERSION_STRING}")
 add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-invalid-offsetof>)
 
 # Enable fuzzing