From 80f63969c7e5730047d94c40f3959b4334bfccac Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Wed, 17 Feb 2016 13:09:03 +0100 Subject: [PATCH] Add TODOs --- .../implementations/onblocks/datanodestore/DataNodeStore.cpp | 1 + src/blockstore/implementations/ondisk/OnDiskBlockStore.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/blobstore/implementations/onblocks/datanodestore/DataNodeStore.cpp b/src/blobstore/implementations/onblocks/datanodestore/DataNodeStore.cpp index 9812e2d5..74103e5d 100644 --- a/src/blobstore/implementations/onblocks/datanodestore/DataNodeStore.cpp +++ b/src/blobstore/implementations/onblocks/datanodestore/DataNodeStore.cpp @@ -97,6 +97,7 @@ uint64_t DataNodeStore::estimateSpaceForNumNodesLeft() const { } void DataNodeStore::removeSubtree(unique_ref 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(node.get()); if (inner != nullptr) { for (uint32_t i = 0; i < inner->numChildren(); ++i) { diff --git a/src/blockstore/implementations/ondisk/OnDiskBlockStore.h b/src/blockstore/implementations/ondisk/OnDiskBlockStore.h index 8e94e09b..ddf11b4c 100644 --- a/src/blockstore/implementations/ondisk/OnDiskBlockStore.h +++ b/src/blockstore/implementations/ondisk/OnDiskBlockStore.h @@ -16,6 +16,7 @@ public: boost::optional> tryCreate(const Key &key, cpputils::Data data) override; boost::optional> 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) override; uint64_t numBlocks() const override; uint64_t estimateNumFreeBytes() const override;