diff options
author | Geir Storli <geirst@verizonmedia.com> | 2021-03-26 13:04:45 +0000 |
---|---|---|
committer | Geir Storli <geirst@verizonmedia.com> | 2021-03-26 13:04:45 +0000 |
commit | f284ec21d313045e031b6a58c1943acea269865c (patch) | |
tree | a97cb1f3818e7662be4c73e886a44a271a20d29c /searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp | |
parent | 29249eef05f2d29a8bb47aa9d5a7fa68f000c3c2 (diff) |
Remove experimental use of mmap file allocator for dense tensor data.
Diffstat (limited to 'searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp')
-rw-r--r-- | searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp b/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp index 8efccf9b51b..f1d910f2635 100644 --- a/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp +++ b/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp @@ -26,7 +26,6 @@ #include <vespa/vespalib/io/fileutil.h> #include <vespa/vespalib/test/insertion_operators.h> #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/vespalib/util/mmap_file_allocator_factory.h> #include <vespa/searchlib/util/bufferwriter.h> #include <vespa/log/log.h> @@ -257,7 +256,6 @@ struct FixtureTraits { bool use_direct_tensor_attribute = false; bool enable_hnsw_index = false; bool use_mock_index = false; - bool use_mmap_file_allocator = false; FixtureTraits dense() && { use_dense_tensor_attribute = true; @@ -265,11 +263,6 @@ struct FixtureTraits { return *this; } - FixtureTraits mmap_file_allocator() && { - use_mmap_file_allocator = true; - return *this; - } - FixtureTraits hnsw() && { use_dense_tensor_attribute = true; enable_hnsw_index = true; @@ -334,9 +327,6 @@ struct Fixture { if (_cfg.tensorType().is_dense()) { _denseTensors = true; } - if (_traits.use_mmap_file_allocator) { - _cfg.setHuge(true); - } if (_traits.use_mock_index) { _index_factory = std::make_unique<MockNearestNeighborIndexFactory>(); } else { @@ -1008,17 +998,4 @@ TEST_F("NN blueprint handles strong filter triggering brute force search", Neare EXPECT_FALSE(bp->may_approximate()); } -TEST("Dense tensor attribute with huge flag uses mmap file allocator") -{ - vespalib::string basedir("mmap-file-allocator-factory-dir"); - vespalib::alloc::MmapFileAllocatorFactory::instance().setup(basedir); - { - Fixture f(vec_2d_spec, FixtureTraits().dense().mmap_file_allocator()); - vespalib::string allocator_dir(basedir + "/0.my_attr"); - EXPECT_TRUE(vespalib::isDirectory(allocator_dir)); - } - vespalib::alloc::MmapFileAllocatorFactory::instance().setup(""); - vespalib::rmdir(basedir, true); -} - TEST_MAIN() { TEST_RUN_ALL(); } |