summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorGeir Storli <geirst@verizonmedia.com>2019-09-10 16:40:31 +0200
committerGitHub <noreply@github.com>2019-09-10 16:40:31 +0200
commit806be081fd15e9c5572e4618394de6bb34b3885f (patch)
tree8784c48fe8624bae781b49b7fe5b3aeda6f0a504 /vespalib
parent9be8547f8720e71d4e80582a9ce5f720d2c22d20 (diff)
parent3f8997f8fadd90cb7fd1f8be8dfbd66cabb62a9e (diff)
Merge pull request #10592 from vespa-engine/geirst/enum-store-cleanup-4
Enum store cleanup 4
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/datastore/i_unique_store_dictionary.h4
-rw-r--r--vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.h2
-rw-r--r--vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.hpp7
-rw-r--r--vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.h3
4 files changed, 3 insertions, 13 deletions
diff --git a/vespalib/src/vespa/vespalib/datastore/i_unique_store_dictionary.h b/vespalib/src/vespa/vespalib/datastore/i_unique_store_dictionary.h
index 3299529032a..9604d1d5339 100644
--- a/vespalib/src/vespa/vespalib/datastore/i_unique_store_dictionary.h
+++ b/vespalib/src/vespa/vespalib/datastore/i_unique_store_dictionary.h
@@ -5,6 +5,7 @@
#include "entryref.h"
#include <vespa/vespalib/util/arrayref.h>
#include <vespa/vespalib/util/generationhandler.h>
+#include <vespa/vespalib/util/memoryusage.h>
#include <functional>
namespace search::datastore {
@@ -27,8 +28,6 @@ public:
public:
using UP = std::unique_ptr<ReadSnapshot>;
virtual ~ReadSnapshot() = default;
- // TODO: Remove when all relevant functions have been migrated to this API.
- virtual EntryRef get_frozen_root() const = 0;
virtual size_t count(const EntryComparator& comp) const = 0;
virtual size_t count_in_range(const EntryComparator& low, const EntryComparator& high) const = 0;
virtual void foreach_key(std::function<void(EntryRef)> callback) const = 0;
@@ -49,7 +48,6 @@ public:
virtual void build(vespalib::ConstArrayRef<EntryRef> refs) = 0;
virtual void build_with_payload(const std::vector<EntryRef>& refs, const std::vector<uint32_t>& payloads) = 0;
virtual std::unique_ptr<ReadSnapshot> get_read_snapshot() const = 0;
- virtual EntryRef get_frozen_root() const = 0;
};
}
diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.h b/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.h
index 21bc796b52b..69fbc332485 100644
--- a/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.h
+++ b/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.h
@@ -27,7 +27,6 @@ protected:
public:
ReadSnapshotImpl(FrozenView frozen_view);
- EntryRef get_frozen_root() const override { return _frozen_view.getRoot(); }
size_t count(const EntryComparator& comp) const override;
size_t count_in_range(const EntryComparator& low, const EntryComparator& high) const override;
void foreach_key(std::function<void(EntryRef)> callback) const override;
@@ -51,7 +50,6 @@ public:
void build(vespalib::ConstArrayRef<EntryRef> refs) override;
void build_with_payload(const std::vector<EntryRef>& refs, const std::vector<uint32_t>& payloads) override;
std::unique_ptr<ReadSnapshot> get_read_snapshot() const override;
- EntryRef get_frozen_root() const override;
};
}
diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.hpp b/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.hpp
index 02bf8ac14e6..14ed0c380c5 100644
--- a/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.hpp
+++ b/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.hpp
@@ -210,11 +210,4 @@ UniqueStoreDictionary<DictionaryT, ParentT>::get_read_snapshot() const
return std::make_unique<ReadSnapshotImpl>(_dict.getFrozenView());
}
-template <typename DictionaryT, typename ParentT>
-EntryRef
-UniqueStoreDictionary<DictionaryT, ParentT>::get_frozen_root() const
-{
- return _dict.getFrozenView().getRoot();
-}
-
}
diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.h b/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.h
index 0ffc695a285..5341647815e 100644
--- a/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.h
+++ b/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.h
@@ -6,6 +6,8 @@
namespace search::datastore {
+class DataStoreBase;
+
/**
* Enumerator for related UniqueStore class.
*
@@ -28,7 +30,6 @@ private:
public:
UniqueStoreEnumerator(const IUniqueStoreDictionary &dict, const DataStoreBase &store);
~UniqueStoreEnumerator();
- EntryRef get_frozen_root() const { return _dict_snapshot->get_frozen_root(); }
void enumerateValue(EntryRef ref);
void enumerateValues();
void clear();