You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by yu...@apache.org on 2013/08/09 08:35:22 UTC
[1/3] git commit: TS-2122: Enlarge the 64KB limitation of log buffer
size
Updated Branches:
refs/heads/master 3fad79d75 -> 5b002b11c
TS-2122: Enlarge the 64KB limitation of log buffer size
The Logging module use uint16_t(LogBuffer->m_state.s.m_offset/byte_count) to
store log buffer size.
It's very dangerous for user, as there are not any warning when user
breaks the limitation.
In our environment, we set the log_buffer_size to 512KB(and set
max_entries_per_buffer to 1000), it make ATS crashing.
This patch enlarge the limitation from 64KB to 4GB by merging *offset* and
*byte_count* variables into one, so that we can use uint32_t to store the
buffer size.
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/c0354fb6
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/c0354fb6
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/c0354fb6
Branch: refs/heads/master
Commit: c0354fb69ecc4ab4ad922e87cc969159bfb76051
Parents: 3fad79d
Author: Yunkai Zhang <qi...@taobao.com>
Authored: Fri Aug 9 11:05:22 2013 +0800
Committer: Yunkai Zhang <qi...@taobao.com>
Committed: Fri Aug 9 14:29:37 2013 +0800
----------------------------------------------------------------------
proxy/logging/LogBuffer.cc | 4 +---
proxy/logging/LogBuffer.h | 3 +--
2 files changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c0354fb6/proxy/logging/LogBuffer.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogBuffer.cc b/proxy/logging/LogBuffer.cc
index 18a569e..f81dffa 100644
--- a/proxy/logging/LogBuffer.cc
+++ b/proxy/logging/LogBuffer.cc
@@ -143,7 +143,6 @@ LogBuffer::LogBuffer(LogObject * owner, size_t size, size_t buf_align, size_t wr
// initialize buffer state
m_state.s.offset = hdr_size;
- m_state.s.byte_count = hdr_size;
// update the buffer id (m_id gets the old value)
m_id = (uint32_t) ink_atomic_increment((pvint32) & M_ID, 1);
@@ -230,7 +229,6 @@ LogBuffer::LB_ResultCode LogBuffer::checkout_write(size_t * write_offset, size_t
++new_s.s.num_writers;
new_s.s.offset += actual_write_size;
++new_s.s.num_entries;
- new_s.s.byte_count += actual_write_size;
ret_val = LB_OK;
} else {
@@ -424,7 +422,7 @@ LogBuffer::update_header_data()
if (m_unaligned_buffer) {
m_header->entry_count = m_state.s.num_entries;
- m_header->byte_count = m_state.s.byte_count;
+ m_header->byte_count = m_state.s.offset;
m_header->high_timestamp = LogUtils::timestamp();
}
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c0354fb6/proxy/logging/LogBuffer.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogBuffer.h b/proxy/logging/LogBuffer.h
index 191b3a5..8f3de6b 100644
--- a/proxy/logging/LogBuffer.h
+++ b/proxy/logging/LogBuffer.h
@@ -118,9 +118,8 @@ union LB_State
int64_t ival;
struct
{
- uint16_t offset; // buffer should be <= 64KB
+ uint32_t offset; // buffer offset(bytes in buffer)
uint16_t num_entries; // number of entries in buffer
- uint16_t byte_count; // bytes in buffer
uint16_t full:1; // not accepting more checkouts
uint16_t num_writers:15; // number of writers
} s;
[3/3] git commit: TS-2063: LogFile::write_ascii_logbuffer3() can
silently drop log entries
Posted by yu...@apache.org.
TS-2063: LogFile::write_ascii_logbuffer3() can silently drop log entries
1) Avoid silently dropping log entries in write_ascii_logbuffer3().
2) Remove overspill logic, and try to write log to disk as much as possible.
3) Simplify the code by removing unecessary *overspill* variables.
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/5b002b11
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/5b002b11
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/5b002b11
Branch: refs/heads/master
Commit: 5b002b11ccecf31f1b66f9203f52f207034f605d
Parents: 3c49b11
Author: Yunkai Zhang <qi...@taobao.com>
Authored: Wed Aug 7 15:18:13 2013 +0800
Committer: Yunkai Zhang <qi...@taobao.com>
Committed: Fri Aug 9 14:30:12 2013 +0800
----------------------------------------------------------------------
mgmt/RecordsConfig.cc | 2 -
proxy/logging/LogConfig.cc | 6 --
proxy/logging/LogConfig.h | 1 -
proxy/logging/LogFile.cc | 124 ++++++++++++++++------------------------
proxy/logging/LogFile.h | 14 +----
proxy/logging/LogObject.cc | 3 +-
6 files changed, 51 insertions(+), 99 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5b002b11/mgmt/RecordsConfig.cc
----------------------------------------------------------------------
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index 23e3c82..cfc2267 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -1167,8 +1167,6 @@ RecordElement RecordsConfig[] = {
,
{RECT_CONFIG, "proxy.config.log.max_line_size", RECD_INT, "9216", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
,
- {RECT_CONFIG, "proxy.config.log.overspill_report_count", RECD_INT, "500", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
- ,
{RECT_CONFIG, "proxy.config.log.xuid_logging_enabled", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
,
// Begin HCL Modifications.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5b002b11/proxy/logging/LogConfig.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogConfig.cc b/proxy/logging/LogConfig.cc
index abd89f9..62875a8 100644
--- a/proxy/logging/LogConfig.cc
+++ b/proxy/logging/LogConfig.cc
@@ -183,7 +183,6 @@ LogConfig::setup_default_values()
ascii_buffer_size = 4 * 9216;
max_line_size = 9216; // size of pipe buffer for SunOS 5.6
- overspill_report_count = 500;
}
void *
@@ -488,11 +487,6 @@ LogConfig::read_configuration_variables()
max_line_size = val;
}
- val = (int) LOG_ConfigReadInteger("proxy.config.log.overspill_report_count");
- if (val > 0) {
- overspill_report_count = val;
- }
-
/* The following variables are initialized after reading the */
/* variable values from records.config */
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5b002b11/proxy/logging/LogConfig.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogConfig.h b/proxy/logging/LogConfig.h
index 11f5b01..654b276 100644
--- a/proxy/logging/LogConfig.h
+++ b/proxy/logging/LogConfig.h
@@ -241,7 +241,6 @@ public:
int ascii_buffer_size;
int max_line_size;
- int overspill_report_count;
char *hostname;
char *logfile_dir;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5b002b11/proxy/logging/LogFile.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogFile.cc b/proxy/logging/LogFile.cc
index e7b9593..430b75a 100644
--- a/proxy/logging/LogFile.cc
+++ b/proxy/logging/LogFile.cc
@@ -86,20 +86,16 @@ static const int FILESIZE_SAFE_THRESHOLD_FACTOR = 10;
-------------------------------------------------------------------------*/
LogFile::LogFile(const char *name, const char *header, LogFileFormat format,
- uint64_t signature, size_t ascii_buffer_size, size_t max_line_size, size_t overspill_report_count)
+ uint64_t signature, size_t ascii_buffer_size, size_t max_line_size)
: m_file_format(format),
m_name(ats_strdup(name)),
m_header(ats_strdup(header)),
m_signature(signature),
m_meta_info(NULL),
- m_max_line_size(max_line_size),
- m_overspill_report_count(overspill_report_count)
+ m_max_line_size(max_line_size)
{
delete m_meta_info;
m_meta_info = NULL;
- m_overspill_bytes = 0;
- m_overspill_written = 0;
- m_attempts_to_write_overspill = 0;
m_fd = -1;
m_start_time = 0L;
m_end_time = 0L;
@@ -107,7 +103,6 @@ LogFile::LogFile(const char *name, const char *header, LogFileFormat format,
m_size_bytes = 0;
m_ascii_buffer_size = (ascii_buffer_size < max_line_size ? max_line_size : ascii_buffer_size);
m_ascii_buffer = NEW(new char[m_ascii_buffer_size]);
- m_overspill_buffer = NEW(new char[m_max_line_size]);
Debug("log-file", "exiting LogFile constructor, m_name=%s, this=%p", m_name, this);
}
@@ -126,10 +121,6 @@ LogFile::LogFile (const LogFile& copy)
m_meta_info (NULL),
m_ascii_buffer_size (copy.m_ascii_buffer_size),
m_max_line_size (copy.m_max_line_size),
- m_overspill_bytes (0),
- m_overspill_written (0),
- m_attempts_to_write_overspill (0),
- m_overspill_report_count (copy.m_overspill_report_count),
m_fd (-1),
m_start_time (0L),
m_end_time (0L),
@@ -137,7 +128,6 @@ LogFile::LogFile (const LogFile& copy)
{
ink_assert(m_ascii_buffer_size >= m_max_line_size);
m_ascii_buffer = NEW (new char[m_ascii_buffer_size]);
- m_overspill_buffer = NEW (new char[m_max_line_size]);
Debug("log-file", "exiting LogFile copy constructor, m_name=%s, this=%p",
m_name, this);
@@ -156,8 +146,6 @@ LogFile::~LogFile()
delete m_meta_info;
delete[]m_ascii_buffer;
m_ascii_buffer = 0;
- delete[]m_overspill_buffer;
- m_overspill_buffer = 0;
Debug("log-file", "exiting LogFile destructor, this=%p", this);
}
@@ -661,81 +649,67 @@ LogFile::write_ascii_logbuffer3(LogBufferHeader * buffer_header, char *alt_forma
while ((entry_header = iter.next())) {
fmt_buf_bytes = 0;
+ ink_release_assert(m_ascii_buffer_size >= m_max_line_size);
+
// fill the buffer with as many records as possible
//
do {
- if (m_ascii_buffer_size - fmt_buf_bytes >= m_max_line_size) {
- int bytes = LogBuffer::to_ascii(entry_header, format_type,
- &m_ascii_buffer[fmt_buf_bytes],
- m_max_line_size - 1,
- fieldlist_str, printf_str,
- buffer_header->version,
- alt_format);
-
- if (bytes > 0) {
- fmt_buf_bytes += bytes;
- m_ascii_buffer[fmt_buf_bytes] = '\n';
- ++fmt_buf_bytes;
- }
- // if writing to a pipe, fill the buffer with a single
- // record to avoid as much as possible overflowing the
- // pipe buffer
- //
- if (m_file_format == ASCII_PIPE)
- break;
+ if (entry_header->entry_len >= m_max_line_size) {
+ Warning("Log is too long(%"PRIu32"), it would be truncated. max_len:%zu",
+ entry_header->entry_len, m_max_line_size);
}
- } while ((entry_header = iter.next()));
- ssize_t bytes_written;
-
- // try to write any data that may not have been written in a
- // previous attempt
- //
- if (m_overspill_bytes) {
- bytes_written = 0;
- if (!Log::config->logging_space_exhausted) {
- bytes_written =::write(m_fd, &m_overspill_buffer[m_overspill_written], m_overspill_bytes);
- }
- if (bytes_written < 0) {
- Error("An error was encountered in writing to %s: %s.", ((m_name) ? m_name : "logfile"), strerror(errno));
+ int bytes = LogBuffer::to_ascii(entry_header, format_type,
+ &m_ascii_buffer[fmt_buf_bytes],
+ m_max_line_size - 1,
+ fieldlist_str, printf_str,
+ buffer_header->version,
+ alt_format);
+
+ if (bytes > 0) {
+ fmt_buf_bytes += bytes;
+ m_ascii_buffer[fmt_buf_bytes] = '\n';
+ ++fmt_buf_bytes;
} else {
- m_overspill_bytes -= bytes_written;
- m_overspill_written += bytes_written;
+ Error("Failed to convert LogBuffer to ascii, have dropped (%"PRIu32") bytes.",
+ entry_header->entry_len);
}
+ // if writing to a pipe, fill the buffer with a single
+ // record to avoid as much as possible overflowing the
+ // pipe buffer
+ //
+ if (m_file_format == ASCII_PIPE)
+ break;
- if (m_overspill_bytes) {
- ++m_attempts_to_write_overspill;
- if (m_overspill_report_count && (m_attempts_to_write_overspill % m_overspill_report_count == 0)) {
- Warning("Have dropped %zu records so far because buffer "
- "for %s is full", m_attempts_to_write_overspill, m_name);
- }
- } else if (m_attempts_to_write_overspill) {
- Warning("Dropped %zu records because buffer for %s was full", m_attempts_to_write_overspill, m_name);
- m_attempts_to_write_overspill = 0;
- }
- }
- // write the buffer out to the file or pipe
+ if (m_ascii_buffer_size - fmt_buf_bytes < m_max_line_size)
+ break;
+ } while ((entry_header = iter.next()));
+
+ int bytes_written = 0;
+
+ // try to write *all* the buffer out to the file or pipe
//
- if (fmt_buf_bytes && !m_overspill_bytes) {
- bytes_written = 0;
- if (!Log::config->logging_space_exhausted) {
- bytes_written =::write(m_fd, m_ascii_buffer, fmt_buf_bytes);
+ while (bytes_written < fmt_buf_bytes) {
+ if (Log::config->logging_space_exhausted) {
+ Warning("logging space exhausted, have dropped (%d) bytes.",
+ (fmt_buf_bytes - bytes_written));
+ break;
}
- if (bytes_written < 0) {
- Error("An error was encountered in writing to %s: %s.", ((m_name) ? m_name : "logfile"), strerror(errno));
- } else {
- if (bytes_written < fmt_buf_bytes) {
- m_overspill_bytes = fmt_buf_bytes - bytes_written;
- if (m_overspill_bytes > m_max_line_size)
- m_overspill_bytes = m_max_line_size;
- memcpy(m_overspill_buffer, &m_ascii_buffer[bytes_written], m_overspill_bytes);
- m_overspill_written = 0;
- }
- total_bytes += bytes_written;
+ int cnt = ::write(m_fd, &m_ascii_buffer[bytes_written],
+ (fmt_buf_bytes - bytes_written));
+ if (cnt < 0) {
+ Error("An error was encountered in writing to %s: %s.",
+ ((m_name) ? m_name : "logfile"), strerror(errno));
+ break;
}
+
+ bytes_written += cnt;
}
+
+ total_bytes += bytes_written;
}
+
return total_bytes;
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5b002b11/proxy/logging/LogFile.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogFile.h b/proxy/logging/LogFile.h
index 09c6660..8d3a4a8 100644
--- a/proxy/logging/LogFile.h
+++ b/proxy/logging/LogFile.h
@@ -127,8 +127,7 @@ class LogFile:public LogBufferSink
{
public:
LogFile(const char *name, const char *header, LogFileFormat format, uint64_t signature,
- size_t ascii_buffer_size = 4 * 9216, size_t max_line_size = 9216,
- size_t overspill_report_count = 1000);
+ size_t ascii_buffer_size = 4 * 9216, size_t max_line_size = 9216);
LogFile(const LogFile &);
~LogFile();
@@ -184,17 +183,6 @@ private:
char *m_ascii_buffer; // buffer for ascii output
size_t m_ascii_buffer_size; // size of ascii buffer
size_t m_max_line_size; // size of longest log line (record)
- // (including newline)
- char *m_overspill_buffer; // buffer for data that did not fit
- // the pipe buffer
- size_t m_overspill_bytes; // bytes in the overspill buffer
- size_t m_overspill_written; // bytes in overspill that have been
- // transferred to pipe buffer
- size_t m_attempts_to_write_overspill; // times transfer from overspill to
- // pipe buffer has been attempted
- size_t m_overspill_report_count; // number of attempts at which
- // overspill report is written to
- // diags log
int m_fd;
long m_start_time;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5b002b11/proxy/logging/LogObject.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogObject.cc b/proxy/logging/LogObject.cc
index 6af216e..c4bcd5d 100644
--- a/proxy/logging/LogObject.cc
+++ b/proxy/logging/LogObject.cc
@@ -113,8 +113,7 @@ LogObject::LogObject(LogFormat *format, const char *log_dir,
m_logFile = NEW(new LogFile (m_filename, header, file_format,
m_signature,
Log::config->ascii_buffer_size,
- Log::config->max_line_size,
- Log::config->overspill_report_count));
+ Log::config->max_line_size));
LogBuffer *b = NEW (new LogBuffer (this, Log::config->log_buffer_size));
ink_assert(b);
[2/3] git commit: TS-2123: Remove useless max_entries_per_buffer
option
Posted by yu...@apache.org.
TS-2123: Remove useless max_entries_per_buffer option
When the configurable value of max_entries_per_buffer in LogHost is
smaller that LogClient, it'll lead to log dropped silently.
Actually, after we fix https://issues.apache.org/jira/browse/TS-2122 issue,
the max_entries_per_buffer option is unnecessary now.
Let's remove it to avoid traps caused by it.
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/3c49b11e
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/3c49b11e
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/3c49b11e
Branch: refs/heads/master
Commit: 3c49b11ed3ab7c436db408af43be253f96c02ce4
Parents: c0354fb
Author: Yunkai Zhang <qi...@taobao.com>
Authored: Fri Aug 9 12:32:15 2013 +0800
Committer: Yunkai Zhang <qi...@taobao.com>
Committed: Fri Aug 9 14:29:45 2013 +0800
----------------------------------------------------------------------
mgmt/RecordsConfig.cc | 2 --
proxy/logging/LogBuffer.cc | 9 ++++-----
proxy/logging/LogBuffer.h | 1 -
proxy/logging/LogConfig.cc | 8 --------
proxy/logging/LogConfig.h | 1 -
5 files changed, 4 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3c49b11e/mgmt/RecordsConfig.cc
----------------------------------------------------------------------
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index bf4b9ee..23e3c82 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -1079,8 +1079,6 @@ RecordElement RecordsConfig[] = {
,
{RECT_CONFIG, "proxy.config.log.log_buffer_size", RECD_INT, "9216", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
,
- {RECT_CONFIG, "proxy.config.log.max_entries_per_buffer", RECD_INT, "200", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
- ,
{RECT_CONFIG, "proxy.config.log.max_secs_per_buffer", RECD_INT, "5", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
,
{RECT_CONFIG, "proxy.config.log.max_space_mb_for_logs", RECD_INT, "2500", RECU_DYNAMIC, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3c49b11e/proxy/logging/LogBuffer.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogBuffer.cc b/proxy/logging/LogBuffer.cc
index f81dffa..d1714ab 100644
--- a/proxy/logging/LogBuffer.cc
+++ b/proxy/logging/LogBuffer.cc
@@ -128,7 +128,7 @@ LogBufferHeader::log_filename()
LogBuffer::LogBuffer(LogObject * owner, size_t size, size_t buf_align, size_t write_align):
m_size(size),
m_buf_align(buf_align),
- m_write_align(write_align), m_max_entries(Log::config->max_entries_per_buffer), m_owner(owner),
+ m_write_align(write_align), m_owner(owner),
m_references(0)
{
size_t hdr_size;
@@ -158,7 +158,7 @@ LogBuffer::LogBuffer(LogObject * owner, LogBufferHeader * header):
m_buffer((char *) header),
m_size(0),
m_buf_align(LB_DEFAULT_ALIGN),
- m_write_align(INK_MIN_ALIGN), m_max_entries(0), m_expiration_time(0), m_owner(owner), m_header(header),
+ m_write_align(INK_MIN_ALIGN), m_expiration_time(0), m_owner(owner), m_header(header),
m_references(0)
{
// This constructor does not allocate a buffer because it gets it as
@@ -221,7 +221,7 @@ LogBuffer::LB_ResultCode LogBuffer::checkout_write(size_t * write_offset, size_t
// before we do
if (write_offset) {
- if (old_s.s.num_entries < m_max_entries && old_s.s.offset + actual_write_size <= m_size) {
+ if (old_s.s.offset + actual_write_size <= m_size) {
// there is room for this entry, update the state
offset = old_s.s.offset;
@@ -810,8 +810,7 @@ LogBufferIterator::next()
LogEntryHeader *entry = (LogEntryHeader *) m_next;
if (entry) {
- if (m_iter_entry_count < m_buffer_entry_count &&
- m_iter_entry_count < (unsigned) Log::config->max_entries_per_buffer) {
+ if (m_iter_entry_count < m_buffer_entry_count) {
m_next += entry->entry_len;
++m_iter_entry_count;
ret_val = entry;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3c49b11e/proxy/logging/LogBuffer.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogBuffer.h b/proxy/logging/LogBuffer.h
index 8f3de6b..055adec 100644
--- a/proxy/logging/LogBuffer.h
+++ b/proxy/logging/LogBuffer.h
@@ -196,7 +196,6 @@ private:
size_t m_buf_align; // the buffer alignment
size_t m_write_align; // the write alignment mask
- int m_max_entries; // max number of entries allowed
long m_expiration_time; // buffer expiration time
LogObject *m_owner; // the LogObject that owns this buf.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3c49b11e/proxy/logging/LogConfig.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogConfig.cc b/proxy/logging/LogConfig.cc
index 112e3a6..abd89f9 100644
--- a/proxy/logging/LogConfig.cc
+++ b/proxy/logging/LogConfig.cc
@@ -103,7 +103,6 @@ LogConfig::setup_default_values()
hostname = ats_strdup(name);
log_buffer_size = (int) (10 * LOG_KILOBYTE);
- max_entries_per_buffer = 100;
max_secs_per_buffer = 5;
max_space_mb_for_logs = 100;
max_space_mb_for_orphan_logs = 25;
@@ -207,11 +206,6 @@ LogConfig::read_configuration_variables()
log_buffer_size = val;
}
- val = (int) LOG_ConfigReadInteger("proxy.config.log.max_entries_per_buffer");
- if (val > 0) {
- max_entries_per_buffer = val;
- }
-
val = (int) LOG_ConfigReadInteger("proxy.config.log.max_secs_per_buffer");
if (val > 0) {
max_secs_per_buffer = val;
@@ -771,7 +765,6 @@ LogConfig::display(FILE * fd)
fprintf(fd, "-----------------------------\n");
fprintf(fd, "Config variables:\n");
fprintf(fd, " log_buffer_size = %d\n", log_buffer_size);
- fprintf(fd, " max_entries_per_buffer = %d\n", max_entries_per_buffer);
fprintf(fd, " max_secs_per_buffer = %d\n", max_secs_per_buffer);
fprintf(fd, " max_space_mb_for_logs = %d\n", max_space_mb_for_logs);
fprintf(fd, " max_space_mb_for_orphan_logs = %d\n", max_space_mb_for_orphan_logs);
@@ -1223,7 +1216,6 @@ LogConfig::register_config_callbacks()
// Note: variables that are not exposed in the UI are commented out
//
LOG_RegisterConfigUpdateFunc("proxy.config.log.log_buffer_size", &LogConfig::reconfigure, NULL);
- LOG_RegisterConfigUpdateFunc("proxy.config.log.max_entries_per_buffer", &LogConfig::reconfigure, NULL);
// LOG_RegisterConfigUpdateFunc ("proxy.config.log.max_secs_per_buffer",
// &LogConfig::reconfigure, NULL);
LOG_RegisterConfigUpdateFunc("proxy.config.log.max_space_mb_for_logs", &LogConfig::reconfigure, NULL);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3c49b11e/proxy/logging/LogConfig.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogConfig.h b/proxy/logging/LogConfig.h
index 4fd23d1..11f5b01 100644
--- a/proxy/logging/LogConfig.h
+++ b/proxy/logging/LogConfig.h
@@ -197,7 +197,6 @@ public:
LogFormatList global_format_list;
int log_buffer_size;
- int max_entries_per_buffer;
int max_secs_per_buffer;
int max_space_mb_for_logs;
int max_space_mb_for_orphan_logs;