summaryrefslogtreecommitdiffstats
path: root/common/storage_lmdb.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-02-08 21:34:06 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-02-08 21:34:06 +0100
commit44744e281a56488c7ef257e12ca379ec4ceb2cdd (patch)
tree5fd45d6c6cf5e68ba2323fac3f498c6afa6f2ddf /common/storage_lmdb.cpp
parentd82f0f6e52b601c3067ca70183458f5ce9b22c22 (diff)
downloadsink-44744e281a56488c7ef257e12ca379ec4ceb2cdd.tar.gz
sink-44744e281a56488c7ef257e12ca379ec4ceb2cdd.zip
Executed database removal in the resource instead of the client.
The resource doesn't really notify all clients properly about the removal, but the tests all still pass.
Diffstat (limited to 'common/storage_lmdb.cpp')
-rw-r--r--common/storage_lmdb.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp
index e2c623e..1efffc4 100644
--- a/common/storage_lmdb.cpp
+++ b/common/storage_lmdb.cpp
@@ -615,4 +615,12 @@ void Storage::removeFromDisk() const
615 mdb_env_close(env); 615 mdb_env_close(env);
616} 616}
617 617
618void Storage::clearEnv()
619{
620 for (auto env : Storage::Private::sEnvironments) {
621 mdb_env_close(env);
622 }
623 Storage::Private::sEnvironments.clear();
624}
625
618} // namespace Sink 626} // namespace Sink