You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sc...@apache.org on 2018/01/10 05:56:42 UTC

[trafficserver] branch master updated: change history buffer from linear buffer to circulating buffer

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

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new c20a319  change history buffer from linear buffer to circulating buffer
c20a319 is described below

commit c20a319bfab99ed088a8d094ba1a4390cf74e6ab
Author: scw00 <sc...@apache.org>
AuthorDate: Sat Dec 16 10:01:23 2017 +0800

    change history buffer from linear buffer to circulating buffer
---
 lib/ts/History.h       | 4 ----
 lib/ts/test_History.cc | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/lib/ts/History.h b/lib/ts/History.h
index 764a3ef..7d2f92f 100644
--- a/lib/ts/History.h
+++ b/lib/ts/History.h
@@ -42,10 +42,6 @@ public:
   void
   push_back(const SourceLocation &location, int event, int reentrant = NO_REENTRANT)
   {
-    if (overflowed()) {
-      return;
-    }
-
     int pos                 = history_pos++ % Count;
     history[pos].location   = location;
     history[pos].event      = (unsigned short)event;
diff --git a/lib/ts/test_History.cc b/lib/ts/test_History.cc
index be17734..9585680 100644
--- a/lib/ts/test_History.cc
+++ b/lib/ts/test_History.cc
@@ -95,7 +95,7 @@ REGRESSION_TEST(History_test)(RegressionTest *t, int /* atype ATS_UNUSED */, int
   tb.check(sm2->history.size() == 2, "Checking that history size is 2");
   tb.check(sm2->history.overflowed() == true, "Checking that history overflowed 4");
 
-  tb.check(strncmp(sm2->history[0].location.str(buf, 128), "test_History.cc:88 (RegressionTest_History_test)",
+  tb.check(strncmp(sm2->history[0].location.str(buf, 128), "test_History.cc:94 (RegressionTest_History_test)",
                    strlen("test_History.cc:88 (RegressionTest_History_test)")) == 0,
            "Checking history string");
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].