You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/10/06 16:57:56 UTC
[11/22] git commit: TS-2255: TS should not flood printing after log
space reach the limit
TS-2255: TS should not flood printing after log space reach the limit
Signed-off-by: Yunkai Zhang <qi...@taobao.com>
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/6aa87ff5
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/6aa87ff5
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/6aa87ff5
Branch: refs/heads/5.0.x
Commit: 6aa87ff56fb729e2863b34f3e7da8b8680b462fc
Parents: d10479e
Author: Yunkai Zhang <qi...@taobao.com>
Authored: Fri Sep 27 14:47:45 2013 +0800
Committer: Yunkai Zhang <qi...@taobao.com>
Committed: Sun Sep 29 11:16:44 2013 +0800
----------------------------------------------------------------------
CHANGES | 6 ++++--
proxy/logging/LogConfig.cc | 6 ++++++
proxy/logging/LogObject.cc | 2 +-
3 files changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6aa87ff5/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 782a38a..b14b9c3 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,9 +1,11 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 4.1.0
- *) TS-2245: cancel the trigger of CacheVC in openWriteCloseDataDone
+ *) [TS-2255] TS should not flood printing after log space reach the limit.
- *) TS-2232: log level should be change from Status to Debug.
+ *) [TS-2245] cancel the trigger of CacheVC in openWriteCloseDataDone.
+
+ *) [TS-2232] log level should be change from Status to Debug.
Author: Yu Qing <zh...@taobao.com>
*) [TS-2201] split drainIncomingChannel two thread, one handle Broadcast
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6aa87ff5/proxy/logging/LogConfig.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogConfig.cc b/proxy/logging/LogConfig.cc
index 8fc0ece..d9810ce 100644
--- a/proxy/logging/LogConfig.cc
+++ b/proxy/logging/LogConfig.cc
@@ -1629,6 +1629,9 @@ LogConfig::update_space_used()
if (!space_to_write(headroom)) {
+ if (!logging_space_exhausted)
+ Note("Logging space exhausted, any logs writing to local disk will be dropped!");
+
logging_space_exhausted = true;
//
// Despite our best efforts, we still can't write to the disk.
@@ -1673,6 +1676,9 @@ LogConfig::update_space_used()
//
// We have enough space to log again; clear any previous messages
//
+ if (logging_space_exhausted)
+ Note("Logging space is no longer exhausted.");
+
logging_space_exhausted = false;
if (m_disk_full || m_partition_full) {
Note("Logging disk is no longer full; " "access logging to local log directory resumed.");
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6aa87ff5/proxy/logging/LogObject.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogObject.cc b/proxy/logging/LogObject.cc
index 089c8eb..f68e1b7 100644
--- a/proxy/logging/LogObject.cc
+++ b/proxy/logging/LogObject.cc
@@ -527,7 +527,7 @@ LogObject::log(LogAccess * lad, char *text_entry)
// likewise, send data to a remote client even if local space is exhausted
// (if there is a remote client, m_logFile will be NULL
if (Log::config->logging_space_exhausted && !writes_to_pipe() && m_logFile) {
- Note("logging space exhausted, can't write to:%s, drop this entry", m_logFile->m_name);
+ Debug("log", "logging space exhausted, can't write to:%s, drop this entry", m_logFile->m_name);
return Log::FULL;
}
// this verification must be done here in order to avoid 'dead' LogBuffers