Add TODOs

This commit is contained in:
Sebastian Messmer 2016-02-17 13:09:03 +01:00
parent 25b93ebe41
commit 80f63969c7
2 changed files with 2 additions and 0 deletions

View File

@ -97,6 +97,7 @@ uint64_t DataNodeStore::estimateSpaceForNumNodesLeft() const {
} }
void DataNodeStore::removeSubtree(unique_ref<DataNode> node) { void DataNodeStore::removeSubtree(unique_ref<DataNode> node) {
//TODO Make this faster by not loading the leaves but just deleting them. Can be recognized, because of the depth of their parents.
DataInnerNode *inner = dynamic_cast<DataInnerNode*>(node.get()); DataInnerNode *inner = dynamic_cast<DataInnerNode*>(node.get());
if (inner != nullptr) { if (inner != nullptr) {
for (uint32_t i = 0; i < inner->numChildren(); ++i) { for (uint32_t i = 0; i < inner->numChildren(); ++i) {

View File

@ -16,6 +16,7 @@ public:
boost::optional<cpputils::unique_ref<Block>> tryCreate(const Key &key, cpputils::Data data) override; boost::optional<cpputils::unique_ref<Block>> tryCreate(const Key &key, cpputils::Data data) override;
boost::optional<cpputils::unique_ref<Block>> load(const Key &key) override; boost::optional<cpputils::unique_ref<Block>> load(const Key &key) override;
//TODO Can we make this faster by allowing to delete blocks by only having theiy Key? So we wouldn't have to load it first?
void remove(cpputils::unique_ref<Block> block) override; void remove(cpputils::unique_ref<Block> block) override;
uint64_t numBlocks() const override; uint64_t numBlocks() const override;
uint64_t estimateNumFreeBytes() const override; uint64_t estimateNumFreeBytes() const override;