Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

VBucketMap shouldn't change in size @runtime

Change-Id: I3801595d5a5a727c4cd9ebf9f5f96b63fc2862cd
Reviewed-on: http://review.couchbase.org/11679
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
  • Loading branch information...
commit 4815a66eae18156401a3f92240f1364a787a42c0 1 parent 4f4e23a
@trondn trondn authored chiyoung committed
View
6 Makefile.am
@@ -93,7 +93,9 @@ ep_la_SOURCES = \
tapconnection.cc tapconnection.hh \
tapconnmap.cc tapconnmap.hh \
tapthrottle.cc tapthrottle.hh \
- vbucket.cc vbucket.hh
+ vbucket.cc vbucket.hh \
+ vbucketmap.cc vbucketmap.hh
+
libobjectregistry_la_SOURCES = objectregistry.cc objectregistry.hh
@@ -313,7 +315,7 @@ vbucket_test_CXXFLAGS = $(AM_CXXFLAGS) -I$(top_srcdir) ${NO_WERROR}
vbucket_test_SOURCES = t/vbucket_test.cc t/threadtests.hh vbucket.hh \
vbucket.cc stored-value.cc stored-value.hh atomic.cc \
testlogger.cc checkpoint.hh checkpoint.cc byteorder.c \
- mutex.cc
+ mutex.cc vbucketmap.cc
vbucket_test_DEPENDENCIES = vbucket.hh stored-value.cc stored-value.hh \
checkpoint.hh checkpoint.cc libobjectregistry.la \
libconfiguration.la
View
3  atomic.cc
@@ -31,6 +31,9 @@ void SpinLock::acquire(void) {
int spin = 0;
while (!tryAcquire()) {
++spin;
+ if (spin > 64) {
+ sched_yield();
+ }
}
EP_SPINLOCK_ACQUIRED(this, spin);
View
38 dtrace/spinlock.d
@@ -0,0 +1,38 @@
+BEGIN
+{
+ end = timestamp + 2 * 1000000000;
+ created = 0;
+ destroyed = 0;
+ fastspin = 0;
+}
+
+tick-10hz
+/timestamp >= end/
+{
+ printf("\nCreated : %d\nDestroyed: %d\nFastspin : %d\n",
+ created, destroyed, fastspin);
+
+ exit(0);
+}
+
+ep*:::spinlock-created
+{
+ created += 1;
+}
+
+ep*:::spinlock-destroyed
+{
+ destroyed += 1;
+}
+
+ep*:::spinlock-acquired / arg1 != 0 /
+{
+ @spins = quantize(arg1);
+ @spinlock[arg0] = count();
+ @stack[ustack(6)] = count();
+}
+
+ep*:::spinlock-acquired / arg1 == 0 /
+{
+ fastspin += 1;
+}
View
4 ep.cc
@@ -444,7 +444,9 @@ EventuallyPersistentStore::EventuallyPersistentStore(EventuallyPersistentEngine
bool startVb0,
bool concurrentDB) :
engine(theEngine), stats(engine.getEpStats()), rwUnderlying(t),
- storageProperties(t->getStorageProperties()), diskFlushAll(false),
+ storageProperties(t->getStorageProperties()),
+ vbuckets(theEngine.getConfiguration()),
+ diskFlushAll(false),
tctx(stats, t, theEngine.observeRegistry),
bgFetchDelay(0)
{
View
1  ep.hh
@@ -46,6 +46,7 @@ extern EXTENSION_LOGGER_DESCRIPTOR *getLogger(void);
#include "atomic.hh"
#include "dispatcher.hh"
#include "vbucket.hh"
+#include "vbucketmap.hh"
#include "item_pager.hh"
#define MAX_BG_FETCH_DELAY 900
View
1  sizes.cc
@@ -77,7 +77,6 @@ int main(int, char **) {
display("Item", sizeof(Item));
display("QueuedItem", sizeof(QueuedItem));
display("VBucket", sizeof(VBucket));
- display("VBucketHolder", sizeof(VBucketHolder));
display("VBucketMap", sizeof(VBucketMap));
display("Stats", sizeof(EPStats));
display("CheckpointManager", sizeof(CheckpointManager));
View
8 t/vbucket_test.cc
@@ -8,7 +8,9 @@
#include <vector>
#include <algorithm>
+#include "configuration.hh"
#include "vbucket.hh"
+#include "vbucketmap.hh"
#include "stats.hh"
#include "threadtests.hh"
@@ -54,7 +56,8 @@ static void testVBucketLookup() {
std::vector<VBucket*> bucketList(3);
std::generate_n(bucketList.begin(), bucketList.capacity(), vbgen);
- VBucketMap vbm;
+ Configuration config;
+ VBucketMap vbm(config);
vbm.addBuckets(bucketList);
assert(!vbm.getBucket(4));
@@ -88,7 +91,8 @@ class AtomicUpdater : public Generator<bool> {
};
static void testConcurrentUpdate(void) {
- VBucketMap vbm;
+ Configuration config;
+ VBucketMap vbm(config);
AtomicUpdater au(&vbm);
getCompletedThreads<bool>(numThreads, &au);
View
310 vbucket.hh
@@ -280,314 +280,4 @@ private:
*/
class NeedMoreBuckets : std::exception {};
-/**
- * Container of vbuckets.
- */
-class VBucketHolder : public RCValue {
-public:
- VBucketHolder(size_t sz) :
- buckets(new RCPtr<VBucket>[sz]),
- bucketDeletion(new Atomic<bool>[sz]),
- bucketVersions(new Atomic<uint16_t>[sz]),
- persistenceCheckpointIds(new Atomic<uint64_t>[sz]),
- size(sz) {
- highPriorityVbSnapshot.set(false);
- lowPriorityVbSnapshot.set(false);
- for (size_t i = 0; i < size; ++i) {
- bucketDeletion[i].set(false);
- bucketVersions[i].set(static_cast<uint16_t>(-1));
- persistenceCheckpointIds[i].set(0);
- }
- }
-
- VBucketHolder(const RCPtr<VBucketHolder> &vbh, size_t sz) :
- buckets(new RCPtr<VBucket>[sz]),
- bucketDeletion(new Atomic<bool>[sz]),
- bucketVersions(new Atomic<uint16_t>[sz]),
- persistenceCheckpointIds(new Atomic<uint64_t>[sz]),
- size(sz) {
-
- // No shrinkage allowed currently.
- assert(sz >= vbh->getSize());
-
- highPriorityVbSnapshot.set(vbh->isHighPriorityVbSnapshotScheduled());
- lowPriorityVbSnapshot.set(vbh->isLowPriorityVbSnapshotScheduled());
-
- std::copy(buckets, buckets+vbh->getSize(), buckets);
- size_t vbh_size = vbh->getSize();
- for (size_t i = 0; i < vbh_size; ++i) {
- bucketDeletion[i].set(vbh->isBucketDeletion(i));
- bucketVersions[i].set(vbh->getBucketVersion(i));
- persistenceCheckpointIds[i].set(vbh->getPersistenceCheckpointId(i));
- }
- for (size_t i = vbh_size; i < size; ++i) {
- bucketDeletion[i].set(false);
- bucketVersions[i].set(static_cast<uint16_t>(-1));
- persistenceCheckpointIds[i].set(0);
- }
- }
-
- ~VBucketHolder() {
- delete[] buckets;
- delete[] bucketDeletion;
- delete[] bucketVersions;
- delete[] persistenceCheckpointIds;
- }
-
- RCPtr<VBucket> getBucket(int id) const {
- assert(id >= 0);
- static RCPtr<VBucket> emptyVBucket;
- if (static_cast<size_t>(id) < size) {
- return buckets[id];
- } else {
- return emptyVBucket;
- }
- }
-
- void addBucket(const RCPtr<VBucket> &b) {
- if (static_cast<size_t>(b->getId()) < size) {
- buckets[b->getId()].reset(b);
- getLogger()->log(EXTENSION_LOG_INFO, NULL,
- "Mapped new vbucket %d in state %s\n",
- b->getId(), VBucket::toString(b->getState()));
- } else {
- throw new NeedMoreBuckets;
- }
- }
-
- /**
- * Remove a vbucket by ID.
- *
- */
- void removeBucket(int id) {
- assert(id >= 0);
-
- if (static_cast<size_t>(id) < size) {
- // Theoretically, this could be off slightly. In
- // practice, this happens only on dead vbuckets.
- buckets[id].reset();
- }
- }
-
- std::vector<int> getBuckets(void) const {
- std::vector<int> rv;
- for (size_t i = 0; i < size; ++i) {
- RCPtr<VBucket> b(buckets[i]);
- if (b) {
- rv.push_back(b->getId());
- }
- }
- return rv;
- }
-
- size_t getSize(void) const {
- return size;
- }
-
- bool isBucketDeletion(int id) {
- assert(id >= 0 && static_cast<size_t>(id) < size);
- return bucketDeletion[id].get();
- }
-
- bool setBucketDeletion(int id, bool delBucket) {
- assert(id >= 0 && static_cast<size_t>(id) < size);
- return bucketDeletion[id].cas(!delBucket, delBucket);
- }
-
- uint16_t getBucketVersion(int id) {
- assert(id >= 0 && static_cast<size_t>(id) < size);
- return bucketVersions[id].get();
- }
-
- void setBucketVersion(int id, uint16_t vb_version) {
- assert(id >= 0 && static_cast<size_t>(id) < size);
- bucketVersions[id].set(vb_version);
- }
-
- uint64_t getPersistenceCheckpointId(int id) {
- assert(id >= 0 && static_cast<size_t>(id) < size);
- return persistenceCheckpointIds[id].get();
- }
-
- void setPersistenceCheckpointId(int id, uint64_t checkpointId) {
- assert(id >= 0 && static_cast<size_t>(id) < size);
- persistenceCheckpointIds[id].set(checkpointId);
- }
-
- /**
- * Check if a vbucket snapshot task is currently scheduled with the high priority.
- * @return "true" if a snapshot task with the high priority is currently scheduled.
- */
- bool isHighPriorityVbSnapshotScheduled(void) {
- return highPriorityVbSnapshot.get();
- }
-
- /**
- * Set the flag to coordinate the scheduled high priority vbucket snapshot and new
- * snapshot requests with the high priority. The flag is "true" if a snapshot
- * task with the high priority is currently scheduled, otherwise "false".
- * If (1) the flag is currently "false" and (2) a new snapshot request invokes
- * this method by passing "true" parameter, this will set the flag to "true" and
- * return "true" to indicate that the new request can be scheduled now. Otherwise,
- * return "false" to prevent duplciate snapshot tasks from being scheduled.
- * When the snapshot task is running and about to writing to disk, it will invoke
- * this method to reset the flag by passing "false" parameter.
- * @param highPrioritySnapshot bool flag for coordination between the scheduled
- * snapshot task and new snapshot requests.
- * @return "true" if a flag's value was changed. Otherwise "false".
- */
- bool setHighPriorityVbSnapshotFlag(bool highPrioritySnapshot) {
- return highPriorityVbSnapshot.cas(!highPrioritySnapshot, highPrioritySnapshot);
- }
-
- /**
- * Check if a vbucket snapshot task is currently scheduled with the low priority.
- * @return "true" if a snapshot task with the low priority is currently scheduled.
- */
- bool isLowPriorityVbSnapshotScheduled(void) {
- return lowPriorityVbSnapshot.get();
- }
-
- /**
- * Set the flag to coordinate the scheduled low priority vbucket snapshot and new
- * snapshot requests with the low priority. The flag is "true" if a snapshot
- * task with the low priority is currently scheduled, otherwise "false".
- * If (1) the flag is currently "false" and (2) a new snapshot request invokes
- * this method by passing "true" parameter, this will set the flag to "true" and
- * return "true" to indicate that the new request can be scheduled now. Otherwise,
- * return "false" to prevent duplciate snapshot tasks from being scheduled.
- * When the snapshot task is running and about to writing to disk, it will invoke
- * this method to reset the flag by passing "false" parameter.
- * @param lowPrioritySnapshot bool flag for coordination between the scheduled
- * low priority snapshot task and new snapshot requests with low priority.
- * @return "true" if a flag's value was changed. Otherwise "false".
- */
- bool setLowPriorityVbSnapshotFlag(bool lowPrioritySnapshot) {
- return lowPriorityVbSnapshot.cas(!lowPrioritySnapshot, lowPrioritySnapshot);
- }
-
-private:
- RCPtr<VBucket> *buckets;
- Atomic<bool> *bucketDeletion;
- Atomic<uint16_t> *bucketVersions;
- Atomic<uint64_t> *persistenceCheckpointIds;
- Atomic<bool> highPriorityVbSnapshot;
- Atomic<bool> lowPriorityVbSnapshot;
- size_t size;
-};
-
-/**
- * A map of known vbuckets.
- */
-class VBucketMap {
-public:
- VBucketMap() : buckets(new VBucketHolder(BASE_VBUCKET_SIZE)) { }
-
- void addBucket(RCPtr<VBucket> &b) {
- assert(b);
- RCPtr<VBucketHolder> o(buckets);
- try {
- o->addBucket(b);
- } catch (NeedMoreBuckets &e) {
- grow(b->getId())->addBucket(b);
- }
- }
-
- void removeBucket(int id) {
- RCPtr<VBucketHolder> o(buckets);
- o->removeBucket(id);
- }
-
- void addBuckets(const std::vector<VBucket*> &newBuckets) {
- std::vector<VBucket*>::const_iterator it;
- for (it = newBuckets.begin(); it != newBuckets.end(); ++it) {
- RCPtr<VBucket> v(*it);
- addBucket(v);
- }
- }
-
- RCPtr<VBucket> getBucket(int id) const {
- RCPtr<VBucketHolder> o(buckets);
- return o->getBucket(id);
- }
-
- size_t getSize() const {
- RCPtr<VBucketHolder> o(buckets);
- return o->getSize();
- }
-
- std::vector<int> getBuckets(void) {
- RCPtr<VBucketHolder> o(buckets);
- return o->getBuckets();
- }
-
- bool isBucketDeletion(int id) {
- RCPtr<VBucketHolder> o(buckets);
- return o->isBucketDeletion(id);
- }
-
- bool setBucketDeletion(int id, bool delBucket) {
- RCPtr<VBucketHolder> o(buckets);
- return o->setBucketDeletion(id, delBucket);
- }
-
- uint16_t getBucketVersion(uint16_t id) {
- RCPtr<VBucketHolder> o(buckets);
- return o->getBucketVersion(id);
- }
-
- void setBucketVersion(uint16_t id, uint16_t vb_version) {
- RCPtr<VBucketHolder> o(buckets);
- o->setBucketVersion(id, vb_version);
- }
-
- uint64_t getPersistenceCheckpointId(uint16_t id) {
- RCPtr<VBucketHolder> o(buckets);
- return o->getPersistenceCheckpointId(id);
- }
-
- void setPersistenceCheckpointId(uint16_t id, uint64_t checkpointId) {
- RCPtr<VBucketHolder> o(buckets);
- o->setPersistenceCheckpointId(id, checkpointId);
- }
-
- bool isHighPriorityVbSnapshotScheduled(void) {
- RCPtr<VBucketHolder> o(buckets);
- return o->isHighPriorityVbSnapshotScheduled();
- }
-
- bool setHighPriorityVbSnapshotFlag(bool highPrioritySnapshot) {
- RCPtr<VBucketHolder> o(buckets);
- return o->setHighPriorityVbSnapshotFlag(highPrioritySnapshot);
- }
-
- bool isLowPriorityVbSnapshotScheduled(void) {
- RCPtr<VBucketHolder> o(buckets);
- return o->isLowPriorityVbSnapshotScheduled();
- }
-
- bool setLowPriorityVbSnapshotFlag(bool lowPrioritySnapshot) {
- RCPtr<VBucketHolder> o(buckets);
- return o->setLowPriorityVbSnapshotFlag(lowPrioritySnapshot);
- }
-
-private:
- RCPtr<VBucketHolder> grow(size_t id) {
- LockHolder lh(mutex);
- if (buckets->getSize() <= id) {
- // still not big enough
- size_t n(0);
- for (n = BASE_VBUCKET_SIZE; n <= id; n *= 2) {} // find next power of 2
- RCPtr<VBucketHolder> nbh(new VBucketHolder(buckets, n));
- buckets = nbh;
- }
- return buckets;
- }
-
- mutable RCPtr<VBucketHolder> buckets;
- Mutex mutex; // Not acquired often, but you could have a lot of stuff waiting on it
-
- DISALLOW_COPY_AND_ASSIGN(VBucketMap);
-};
-
#endif /* VBUCKET_HH */
View
124 vbucketmap.cc
@@ -0,0 +1,124 @@
+/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+#include "config.h"
+#include "vbucketmap.hh"
+
+
+VBucketMap::VBucketMap(Configuration &config) :
+ buckets(new RCPtr<VBucket>[config.getMaxVbuckets()]),
+ bucketDeletion(new Atomic<bool>[config.getMaxVbuckets()]),
+ bucketVersions(new Atomic<uint16_t>[config.getMaxVbuckets()]),
+ persistenceCheckpointIds(new Atomic<uint64_t>[config.getMaxVbuckets()]),
+ size(config.getMaxVbuckets())
+{
+ highPriorityVbSnapshot.set(false);
+ lowPriorityVbSnapshot.set(false);
+ for (size_t i = 0; i < size; ++i) {
+ bucketDeletion[i].set(false);
+ bucketVersions[i].set(static_cast<uint16_t>(-1));
+ persistenceCheckpointIds[i].set(0);
+ }
+}
+
+VBucketMap::~VBucketMap() {
+ delete[] buckets;
+ delete[] bucketDeletion;
+ delete[] bucketVersions;
+ delete[] persistenceCheckpointIds;
+}
+
+RCPtr<VBucket> VBucketMap::getBucket(uint16_t id) const {
+ static RCPtr<VBucket> emptyVBucket;
+ if (static_cast<size_t>(id) < size) {
+ return buckets[id];
+ } else {
+ return emptyVBucket;
+ }
+}
+
+void VBucketMap::addBucket(const RCPtr<VBucket> &b) {
+ if (static_cast<size_t>(b->getId()) < size) {
+ buckets[b->getId()].reset(b);
+ getLogger()->log(EXTENSION_LOG_INFO, NULL,
+ "Mapped new vbucket %d in state %s",
+ b->getId(), VBucket::toString(b->getState()));
+ } else {
+ throw new NeedMoreBuckets;
+ }
+}
+
+void VBucketMap::removeBucket(uint16_t id) {
+ if (static_cast<size_t>(id) < size) {
+ // Theoretically, this could be off slightly. In
+ // practice, this happens only on dead vbuckets.
+ buckets[id].reset();
+ }
+}
+
+std::vector<int> VBucketMap::getBuckets(void) const {
+ std::vector<int> rv;
+ for (size_t i = 0; i < size; ++i) {
+ RCPtr<VBucket> b(buckets[i]);
+ if (b) {
+ rv.push_back(b->getId());
+ }
+ }
+ return rv;
+}
+
+size_t VBucketMap::getSize(void) const {
+ return size;
+}
+
+bool VBucketMap::isBucketDeletion(uint16_t id) const {
+ assert(id < size);
+ return bucketDeletion[id].get();
+}
+
+bool VBucketMap::setBucketDeletion(uint16_t id, bool delBucket) {
+ assert(id < size);
+ return bucketDeletion[id].cas(!delBucket, delBucket);
+}
+
+uint16_t VBucketMap::getBucketVersion(uint16_t id) const {
+ assert(id < size);
+ return bucketVersions[id].get();
+}
+
+void VBucketMap::setBucketVersion(uint16_t id, uint16_t vb_version) {
+ assert(id < size);
+ bucketVersions[id].set(vb_version);
+}
+
+uint64_t VBucketMap::getPersistenceCheckpointId(uint16_t id) {
+ assert(id < size);
+ return persistenceCheckpointIds[id].get();
+}
+
+void VBucketMap::setPersistenceCheckpointId(uint16_t id, uint64_t checkpointId) {
+ assert(id < size);
+ persistenceCheckpointIds[id].set(checkpointId);
+}
+
+bool VBucketMap::isHighPriorityVbSnapshotScheduled(void) const {
+ return highPriorityVbSnapshot.get();
+}
+
+bool VBucketMap::setHighPriorityVbSnapshotFlag(bool highPrioritySnapshot) {
+ return highPriorityVbSnapshot.cas(!highPrioritySnapshot, highPrioritySnapshot);
+}
+
+bool VBucketMap::isLowPriorityVbSnapshotScheduled(void) const {
+ return lowPriorityVbSnapshot.get();
+}
+
+bool VBucketMap::setLowPriorityVbSnapshotFlag(bool lowPrioritySnapshot) {
+ return lowPriorityVbSnapshot.cas(!lowPrioritySnapshot, lowPrioritySnapshot);
+}
+
+void VBucketMap::addBuckets(const std::vector<VBucket*> &newBuckets) {
+ std::vector<VBucket*>::const_iterator it;
+ for (it = newBuckets.begin(); it != newBuckets.end(); ++it) {
+ RCPtr<VBucket> v(*it);
+ addBucket(v);
+ }
+}
View
101 vbucketmap.hh
@@ -0,0 +1,101 @@
+/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+#ifndef VBUCKETMAP_HH
+#define VBUCKETMAP_HH 1
+
+#include "configuration.hh"
+#include "vbucket.hh"
+
+/**
+ * A map of known vbuckets.
+ */
+class VBucketMap {
+public:
+ VBucketMap(Configuration &config);
+ ~VBucketMap();
+
+ void addBucket(const RCPtr<VBucket> &b);
+ void removeBucket(uint16_t id);
+ void addBuckets(const std::vector<VBucket*> &newBuckets);
+ RCPtr<VBucket> getBucket(uint16_t id) const;
+ size_t getSize() const;
+ std::vector<int> getBuckets(void) const;
+ bool isBucketDeletion(uint16_t id) const;
+ bool setBucketDeletion(uint16_t id, bool delBucket);
+ uint16_t getBucketVersion(uint16_t id) const;
+ void setBucketVersion(uint16_t id, uint16_t vb_version);
+ uint64_t getPersistenceCheckpointId(uint16_t id);
+ void setPersistenceCheckpointId(uint16_t id, uint64_t checkpointId);
+ /**
+ * Check if a vbucket snapshot task is currently scheduled with
+ * the high priority.
+ *
+ * @return true if a snapshot task with the high priority is
+ * currently scheduled.
+ */
+ bool isHighPriorityVbSnapshotScheduled(void) const;
+ /**
+ * Set the flag to coordinate the scheduled high priority vbucket
+ * snapshot and new snapshot requests with the high priority. The
+ * flag is "true" if a snapshot task with the high priority is
+ * currently scheduled, otherwise "false". If (1) the flag is
+ * currently "false" and (2) a new snapshot request invokes this
+ * method by passing "true" parameter, this will set the flag to
+ * "true" and return "true" to indicate that the new request can
+ * be scheduled now. Otherwise, return "false" to prevent
+ * duplciate snapshot tasks from being scheduled. When the
+ * snapshot task is running and about to writing to disk, it will
+ * invoke this method to reset the flag by passing "false"
+ * parameter.
+ *
+ * @param highPrioritySnapshot bool flag for coordination between
+ * the scheduled snapshot task and new
+ * snapshot requests.
+ * @return "true" if a flag's value was changed. Otherwise "false".
+ */
+ bool setHighPriorityVbSnapshotFlag(bool highPrioritySnapshot);
+ /**
+ * Check if a vbucket snapshot task is currently scheduled with
+ * the low priority.
+ *
+ * @return "true" if a snapshot task with the low priority is
+ * currently scheduled.
+ */
+ bool isLowPriorityVbSnapshotScheduled(void) const;
+
+ /**
+ * Set the flag to coordinate the scheduled low priority vbucket
+ * snapshot and new snapshot requests with the low priority. The
+ * flag is "true" if a snapshot task with the low priority is
+ * currently scheduled, otherwise "false". If (1) the flag is
+ * currently "false" and (2) a new snapshot request invokes this
+ * method by passing "true" parameter, this will set the flag to
+ * "true" and return "true" to indicate that the new request can
+ * be scheduled now. Otherwise, return "false" to prevent
+ * duplciate snapshot tasks from being scheduled. When the
+ * snapshot task is running and about to writing to disk, it will
+ * invoke this method to reset the flag by passing "false"
+ * parameter.
+ *
+ * @param lowPrioritySnapshot bool flag for coordination between
+ * the scheduled low priority snapshot
+ * task and new snapshot requests with
+ * low priority.
+ *
+ * @return "true" if a flag's value was changed. Otherwise
+ * "false".
+ */
+ bool setLowPriorityVbSnapshotFlag(bool lowPrioritySnapshot);
+private:
+
+ RCPtr<VBucket> *buckets;
+ Atomic<bool> *bucketDeletion;
+ Atomic<uint16_t> *bucketVersions;
+ Atomic<uint64_t> *persistenceCheckpointIds;
+ Atomic<bool> highPriorityVbSnapshot;
+ Atomic<bool> lowPriorityVbSnapshot;
+ size_t size;
+
+ DISALLOW_COPY_AND_ASSIGN(VBucketMap);
+};
+
+#endif /* VBUCKET_HH */
View
1  win32/Makefile.mingw
@@ -79,6 +79,7 @@ EP_ENGINE_CC_SRC = \
tapconnection.cc \
tapthrottle.cc \
vbucket.cc \
+ vbucketmap.cc
EP_ENGINE_C_SRC = \
byteorder.c \
Please sign in to comment.
Something went wrong with that request. Please try again.