Permalink
Browse files

MB-6451 Remove the invalid vbucket table remover module.

The invalid vbucket table remover is only used with sqlite
backend.

Change-Id: I71a176d1f5120934dae7069a475c5190e1756cb0
Reviewed-on: http://review.couchbase.org/20213
Reviewed-by: Liang Guo <liang@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
  • Loading branch information...
1 parent 188f829 commit 0381fd6a6046834c393f089a7f6098eedea705dc @chiyoung chiyoung committed Aug 27, 2012
Showing with 0 additions and 70 deletions.
  1. +0 −2 Makefile.am
  2. +0 −1 docs/stats.org
  3. +0 −1 src/ep.cc
  4. +0 −2 src/ep_engine.cc
  5. +0 −24 src/invalid_vbtable_remover.cc
  6. +0 −35 src/invalid_vbtable_remover.hh
  7. +0 −4 src/stats.hh
  8. +0 −1 win32/Makefile.mingw
View
@@ -65,8 +65,6 @@ ep_la_SOURCES = include/ep-engine/command_ids.h \
src/flusher.cc src/flusher.hh \
src/histo.hh \
src/htresizer.cc src/htresizer.hh \
- src/invalid_vbtable_remover.hh \
- src/invalid_vbtable_remover.cc \
src/item.cc src/item.hh \
src/item_pager.cc src/item_pager.hh \
src/kvstore.hh \
View
@@ -693,7 +693,6 @@ Reset Histograms:
| disk_update |
| disk_del |
| disk_vb_del |
-| disk_invalid_vbtable_del |
| disk_commit |
| get_stats_cmd |
| item_alloc_sizes |
View
@@ -34,7 +34,6 @@
#include "ep_engine.h"
#include "htresizer.hh"
#include "checkpoint_remover.hh"
-#include "invalid_vbtable_remover.hh"
#include "access_scanner.hh"
class StatsValueChangeListener : public ValueChangedListener {
View
@@ -3172,8 +3172,6 @@ ENGINE_ERROR_CODE EventuallyPersistentEngine::doTimingStats(const void *cookie,
add_casted_stat("disk_update", stats.diskUpdateHisto, add_stat, cookie);
add_casted_stat("disk_del", stats.diskDelHisto, add_stat, cookie);
add_casted_stat("disk_vb_del", stats.diskVBDelHisto, add_stat, cookie);
- add_casted_stat("disk_invalid_vbtable_del", stats.diskInvalidVBTableDelHisto,
- add_stat, cookie);
add_casted_stat("disk_commit", stats.diskCommitHisto, add_stat, cookie);
add_casted_stat("disk_vbstate_snapshot", stats.snapshotVbucketHisto,
add_stat, cookie);
@@ -1,24 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-
-#include "config.h"
-#include "invalid_vbtable_remover.hh"
-#include "ep_engine.h"
-
-const size_t PERSISTENCE_QUEUE_SIZE_THRESHOLD(1000000);
-
-bool InvalidVBTableRemover::callback(Dispatcher &d, TaskId &t) {
- size_t queueSize = engine->getEpStats().queue_size.get() +
- engine->getEpStats().flusher_todo.get();
- if (queueSize < PERSISTENCE_QUEUE_SIZE_THRESHOLD) {
- // TODO: We need to determine the persistence queue size threshould dynamically
- // by considering various stats. More elegant solution would be to implement the
- // dynamic configuration manager in ns_server, which adjusts this threshold dynamically
- // based on various monitoring stats from each node.
- hrtime_t start_time(gethrtime());
- engine->getEpStore()->getRWUnderlying()->destroyInvalidVBuckets(true);
- hrtime_t wall_time = (gethrtime() - start_time) / 1000;
- engine->getEpStats().diskInvalidVBTableDelHisto.add(wall_time);
- }
- d.snooze(t, INVALID_VBTABLE_DEL_FREQ);
- return true;
-}
@@ -1,35 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-#ifndef INVALID_VBTABLE_REMOVER_HH
-#define INVALID_VBTABLE_REMOVER_HH 1
-
-#include "common.hh"
-#include "dispatcher.hh"
-#include "stats.hh"
-
-const int INVALID_VBTABLE_DEL_FREQ(600);
-
-// Forward declaration.
-class EventuallyPersistentEngine;
-
-/**
- * Periodically remove invalid vbucket tables from the underlying database
- */
-class InvalidVBTableRemover : public DispatcherCallback {
-public:
- InvalidVBTableRemover(EventuallyPersistentEngine *e) : engine(e) { }
-
- bool callback(Dispatcher &d, TaskId &t);
-
- /**
- * Description of task.
- */
- std::string description() {
- std::string rv("Removing an invalid vbucket table from DB");
- return rv;
- }
-
-private:
- EventuallyPersistentEngine *engine;
-};
-
-#endif /* INVALID_VBTABLE_REMOVER_HH */
View
@@ -334,9 +334,6 @@ public:
//! Histogram of execution time of disk vbucket deletions
Histogram<hrtime_t> diskVBDelHisto;
- //! Histogram of execution time of invalid vbucket table deletions from disk
- Histogram<hrtime_t> diskInvalidVBTableDelHisto;
-
//! Histogram of disk commits
Histogram<hrtime_t> diskCommitHisto;
@@ -411,7 +408,6 @@ public:
diskUpdateHisto.reset();
diskDelHisto.reset();
diskVBDelHisto.reset();
- diskInvalidVBTableDelHisto.reset();
diskCommitHisto.reset();
dataAgeHisto.reset();
@@ -73,7 +73,6 @@ EP_ENGINE_CC_SRC = \
src/ep_extension.cc \
src/flusher.cc \
src/htresizer.cc \
- src/invalid_vbtable_remover.cc \
src/item.cc \
src/item_pager.cc \
src/kvstore.cc \

0 comments on commit 0381fd6

Please sign in to comment.