fix old bugs and ready to write snapshot

This commit is contained in:
2024-05-04 05:19:00 +00:00
parent ae57e20ad6
commit 9b8c1569a6
2 changed files with 3 additions and 3 deletions

View File

@ -823,7 +823,7 @@ class BPlusTreeIndexer {
if (pos.is_end) return false; if (pos.is_end) return false;
if (key_cmp(key, pos.path.back().first.template As<PageType>()->data.p_data[pos.path.back().second].first)) if (key_cmp(key, pos.path.back().first.template As<PageType>()->data.p_data[pos.path.back().second].first))
return false; return false;
if (!value_removed) { if (value_removed != nullptr) {
*value_removed = pos.path.back().first.template As<PageType>()->data.p_data[pos.path.back().second].second; *value_removed = pos.path.back().first.template As<PageType>()->data.p_data[pos.path.back().second].second;
} }
RemoveEntryAt(pos); RemoveEntryAt(pos);

View File

@ -263,8 +263,8 @@ TEST(MemoryRiver, T2) {
size_t interal_id_tot = 0; size_t interal_id_tot = 0;
const unsigned int RndSeed = testing::GTEST_FLAG(random_seed); const unsigned int RndSeed = testing::GTEST_FLAG(random_seed);
std::mt19937 rnd(RndSeed); std::mt19937 rnd(RndSeed);
remove("T2.std"); remove("/tmp/T2.std");
remove("T2.dat"); remove("/tmp/T2.dat");
const int kInfoLength = 100; const int kInfoLength = 100;
{ {
sol::MemoryRiver<DataType, kInfoLength> STD("/tmp/T2.std"); sol::MemoryRiver<DataType, kInfoLength> STD("/tmp/T2.std");