Skip to content

Commit

Permalink
KUDU-1939. Remove WARNING about large arenas
Browse files Browse the repository at this point in the history
This WARNING turned out to be scary to users and hasn't been
particularly useful for us in recent years. This patch just removes it.

Change-Id: I8e98cc9ff4947ecd5970b5cc56d97d248ca1de7e
Reviewed-on: http://gerrit.cloudera.org:8080/6542
Reviewed-by: Adar Dembo <[email protected]>
Tested-by: Kudu Jenkins
Reviewed-by: Jean-Daniel Cryans <[email protected]>
  • Loading branch information
toddlipcon authored and jdcryans committed Apr 4, 2017
1 parent 2407c2c commit 2bc2c32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
18 changes: 2 additions & 16 deletions src/kudu/util/memory/arena.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ using std::sort;
using std::swap;
using std::unique_ptr;

DEFINE_int64(arena_warn_threshold_bytes, 256*1024*1024,
"Number of bytes beyond which to emit a warning for a large arena");
TAG_FLAG(arena_warn_threshold_bytes, hidden);

namespace kudu {

template <bool THREADSAFE>
Expand All @@ -49,17 +45,15 @@ ArenaBase<THREADSAFE>::ArenaBase(
size_t max_buffer_size)
: buffer_allocator_(buffer_allocator),
max_buffer_size_(max_buffer_size),
arena_footprint_(0),
warned_(false) {
arena_footprint_(0) {
AddComponent(CHECK_NOTNULL(NewComponent(initial_buffer_size, 0)));
}

template <bool THREADSAFE>
ArenaBase<THREADSAFE>::ArenaBase(size_t initial_buffer_size, size_t max_buffer_size)
: buffer_allocator_(HeapBufferAllocator::Get()),
max_buffer_size_(max_buffer_size),
arena_footprint_(0),
warned_(false) {
arena_footprint_(0) {
AddComponent(CHECK_NOTNULL(NewComponent(initial_buffer_size, 0)));
}

Expand Down Expand Up @@ -128,13 +122,6 @@ void ArenaBase<THREADSAFE>::AddComponent(ArenaBase::Component *component) {
ReleaseStoreCurrent(component);
arena_.push_back(unique_ptr<Component>(component));
arena_footprint_ += component->size();
if (PREDICT_FALSE(arena_footprint_ > FLAGS_arena_warn_threshold_bytes) && !warned_) {
LOG(WARNING) << "Arena " << reinterpret_cast<const void *>(this)
<< " footprint (" << arena_footprint_ << " bytes) exceeded warning threshold ("
<< FLAGS_arena_warn_threshold_bytes << " bytes)\n"
<< GetStackTrace();
warned_ = true;
}
}

template <bool THREADSAFE>
Expand All @@ -149,7 +136,6 @@ void ArenaBase<THREADSAFE>::Reset() {
}
arena_.back()->Reset();
arena_footprint_ = arena_.back()->size();
warned_ = false;

#ifndef NDEBUG
// In debug mode release the last component too for (hopefully) better
Expand Down
4 changes: 0 additions & 4 deletions src/kudu/util/memory/arena.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,6 @@ class ArenaBase {
const size_t max_buffer_size_;
size_t arena_footprint_;

// True if this Arena has already emitted a warning about surpassing
// the global warning size threshold.
bool warned_;

// Lock covering 'slow path' allocation, when new components are
// allocated and added to the arena's list. Also covers any other
// mutation of the component data structure (eg Reset).
Expand Down

0 comments on commit 2bc2c32

Please sign in to comment.