From 85ec50552d3a718d07350bc454612ee9aee439fb Mon Sep 17 00:00:00 2001 From: Pepijn Schoen Date: Fri, 7 Apr 2017 16:51:00 +0200 Subject: [PATCH] fingerprint .ramIndex / tree nodes --- include/util/static_rtree.hpp | 4 ++-- src/benchmarks/static_rtree.cpp | 2 +- src/storage/storage.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/util/static_rtree.hpp b/include/util/static_rtree.hpp index 5d69a7ed3..8dd8bec65 100644 --- a/include/util/static_rtree.hpp +++ b/include/util/static_rtree.hpp @@ -334,7 +334,7 @@ class StaticRTree // open tree file storage::io::FileWriter tree_node_file(tree_node_filename, - storage::io::FileWriter::HasNoFingerprint); + storage::io::FileWriter::GenerateFingerprint); std::uint64_t size_of_tree = m_search_tree.size(); BOOST_ASSERT_MSG(0 < size_of_tree, "tree empty"); @@ -351,7 +351,7 @@ class StaticRTree : m_coordinate_list(coordinate_list) { storage::io::FileReader tree_node_file(node_file, - storage::io::FileReader::HasNoFingerprint); + storage::io::FileReader::VerifyFingerprint); const auto tree_size = tree_node_file.ReadElementCount64(); diff --git a/src/benchmarks/static_rtree.cpp b/src/benchmarks/static_rtree.cpp index a19f12834..4655fa226 100644 --- a/src/benchmarks/static_rtree.cpp +++ b/src/benchmarks/static_rtree.cpp @@ -32,7 +32,7 @@ using BenchStaticRTree = util::StaticRTree loadCoordinates(const boost::filesystem::path &nodes_file) { storage::io::FileReader nodes_path_file_reader(nodes_file, - storage::io::FileReader::HasNoFingerprint); + storage::io::FileReader::VerifyFingerprint); extractor::QueryNode current_node; unsigned coordinate_count = nodes_path_file_reader.ReadElementCount32(); diff --git a/src/storage/storage.cpp b/src/storage/storage.cpp index 67cd488a4..c615abba6 100644 --- a/src/storage/storage.cpp +++ b/src/storage/storage.cpp @@ -272,7 +272,7 @@ void Storage::PopulateLayout(DataLayout &layout) // load rsearch tree size { - io::FileReader tree_node_file(config.ram_index_path, io::FileReader::HasNoFingerprint); + io::FileReader tree_node_file(config.ram_index_path, io::FileReader::VerifyFingerprint); const auto tree_size = tree_node_file.ReadElementCount64(); layout.SetBlockSize(DataLayout::R_SEARCH_TREE, tree_size); @@ -731,7 +731,7 @@ void Storage::PopulateData(const DataLayout &layout, char *memory_ptr) // store search tree portion of rtree { - io::FileReader tree_node_file(config.ram_index_path, io::FileReader::HasNoFingerprint); + io::FileReader tree_node_file(config.ram_index_path, io::FileReader::VerifyFingerprint); // perform this read so that we're at the right stream position for the next // read. tree_node_file.Skip(1);