diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-08-08 12:09:47 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-08-08 12:09:47 +1000 |
commit | ffc1f95789a72a556dfba143b6d2169930771f7a (patch) | |
tree | b8fc022f3363503497fa3eca61058060d196a7d6 /source/core | |
parent | b2afd6514413d95c083d60973a105e35da0b769a (diff) |
nicer error logging for BTree Repacker
recoverAll was really just sitting there
Diffstat (limited to 'source/core')
-rw-r--r-- | source/core/StarBTreeDatabase.cpp | 5 | ||||
-rw-r--r-- | source/core/StarBTreeDatabase.hpp | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/source/core/StarBTreeDatabase.cpp b/source/core/StarBTreeDatabase.cpp index b188f20..19b0bd2 100644 --- a/source/core/StarBTreeDatabase.cpp +++ b/source/core/StarBTreeDatabase.cpp @@ -196,6 +196,11 @@ void BTreeDatabase::forAll(function<void(ByteArray, ByteArray)> v) { m_impl.forAll(std::move(v)); } +void BTreeDatabase::recoverAll(function<void(ByteArray, ByteArray)> v, function<void(String const&, std::exception const&)> e) { + ReadLocker readLocker(m_lock); + m_impl.recoverAll(std::move(v), std::move(e)); +} + bool BTreeDatabase::insert(ByteArray const& k, ByteArray const& data) { WriteLocker writeLocker(m_lock); checkKeySize(k); diff --git a/source/core/StarBTreeDatabase.hpp b/source/core/StarBTreeDatabase.hpp index 8f7a4fd..f1b88a1 100644 --- a/source/core/StarBTreeDatabase.hpp +++ b/source/core/StarBTreeDatabase.hpp @@ -64,6 +64,7 @@ public: void forEach(ByteArray const& lower, ByteArray const& upper, function<void(ByteArray, ByteArray)> v); void forAll(function<void(ByteArray, ByteArray)> v); + void recoverAll(function<void(ByteArray, ByteArray)> v, function<void(String const&, std::exception const&)> e); // Returns true if a value was overwritten bool insert(ByteArray const& k, ByteArray const& data); |