Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
432 changes: 342 additions & 90 deletions benchmark/local_infinity/knn/knn_import_benchmark.cpp

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions benchmark/local_infinity/knn/knn_query_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@

#include "hnsw_benchmark_util.h"

import std;
#include <cassert>

import infinity_core;

using std::size_t;
import std.compat;

import compilation_config;
import knn_expr;
import column_expr;
Expand Down
4 changes: 3 additions & 1 deletion conf/pytest_parallel_infinity_conf.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ log_to_stdout = true
log_level = "trace"

[storage]
persistence_dir = "/var/infinity/persistence"
#persistence_dir = "/var/infinity/persistence"
persistence_dir = ""
# dump memory index entry when it reachs the capacity
mem_index_capacity = 8192
compact_interval = "0s"
optimize_interval = "0s"

[buffer]
buffer_manager_size = "8GB"
Expand Down
12 changes: 8 additions & 4 deletions python/restart_test/test_memidx.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,9 +556,11 @@ def part1(infinity_obj):
time.sleep(1)

idx1_dirs = list(pathlib.Path(db1_dir).rglob("*chunk*"))
assert len(idx1_dirs) == 2
# assert len(idx1_dirs) == 2
assert len(idx1_dirs) == 1
idx2_dirs = list(pathlib.Path(db2_dir).rglob("*chunk*"))
assert len(idx2_dirs) == 2
# assert len(idx2_dirs) == 2
assert len(idx2_dirs) == 1

part1()

Expand All @@ -581,9 +583,11 @@ def part2(infinity_obj):

idx1_dirs = list(pathlib.Path(db1_dir).rglob("*chunk*"))
print(idx1_dirs)
assert len(idx1_dirs) == 3
# assert len(idx1_dirs) == 3
assert len(idx1_dirs) == 1
idx2_dirs = list(pathlib.Path(db2_dir).rglob("*chunk*"))
assert len(idx2_dirs) == 3
# assert len(idx2_dirs) == 3
assert len(idx2_dirs) == 1

# wait for optimize commit
# The optimization transaction creates the file before committing.
Expand Down
5 changes: 0 additions & 5 deletions src/common/analyzer/wordnet_lemmatizer_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@

module;

#include <cassert>
#include <filesystem>
#include <fstream>
#include <sstream>

module infinity_core:wordnet_lemmatizer.impl;

import :wordnet_lemmatizer;
Expand Down
82 changes: 56 additions & 26 deletions src/common/boost.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -22,42 +22,72 @@ module;
#include <boost/asio/write.hpp>
#include <boost/bind/bind.hpp>
#include <boost/dynamic_bitset.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
#include <boost/interprocess/containers/containers_fwd.hpp>
#include <boost/interprocess/containers/map.hpp>
#include <boost/interprocess/containers/string.hpp>
#include <boost/interprocess/containers/vector.hpp>
#include <boost/interprocess/managed_mapped_file.hpp>
#include <boost/interprocess/offset_ptr.hpp>
#include <boost/interprocess/sync/interprocess_mutex.hpp>
#include <boost/interprocess/sync/interprocess_sharable_mutex.hpp>
#include <boost/thread.hpp>

export module infinity_core:boost;

namespace boost {
export namespace boost {
using boost::bind;
using boost::dynamic_bitset;
using boost::shared_mutex;
using boost::unique_lock;
using boost::upgrade_lock;
using boost::upgrade_to_unique_lock;

namespace system {
export using boost::system::error_code;
using boost::system::error_code;
}
export using boost::bind;
export using boost::dynamic_bitset;
export using boost::upgrade_lock;
export using boost::upgrade_to_unique_lock;
export using boost::shared_mutex;
export using boost::unique_lock;
// export using boost::mutex;

namespace asio {
export using boost::asio::io_context;
export using boost::asio::read;
export using boost::asio::buffer;
export using boost::asio::transfer_at_least;
export using boost::asio::mutable_buffer;
export using boost::asio::write;
using boost::asio::buffer;
using boost::asio::io_context;
using boost::asio::mutable_buffer;
using boost::asio::read;
using boost::asio::transfer_at_least;
using boost::asio::write;
namespace ip {
export using boost::asio::ip::tcp;
export using boost::asio::ip::make_address;
export using boost::asio::ip::address;
using boost::asio::ip::address;
using boost::asio::ip::make_address;
using boost::asio::ip::tcp;
} // namespace ip
namespace error {
export using boost::asio::error::broken_pipe;
export using boost::asio::error::connection_reset;
using boost::asio::error::broken_pipe;
using boost::asio::error::connection_reset;
} // namespace error
} // namespace asio
} // namespace boost

// export namespace boost {
// using boost::defer_lock_t;
// // using boost::defer_lock;
// // using BOOST_CONSTEXPR_OR_CONST defer_lock_t defer_lock = {};
// } // namespace boost
namespace interprocess {
using boost::interprocess::offset_ptr;

using boost::interprocess::allocator;
using boost::interprocess::vector;
// export using boost::interprocess::map;

using boost::interprocess::file_mapping;
using boost::interprocess::managed_mapped_file;

using boost::interprocess::interprocess_mutex;
using boost::interprocess::interprocess_sharable_mutex;

inline constexpr auto create_only_infinity = create_only;
inline constexpr auto open_copy_on_write_infinity = open_copy_on_write;
inline constexpr auto open_only_infinity = open_only;
inline constexpr auto open_or_create_infinity = open_or_create;
inline constexpr auto open_read_only_infinity = open_read_only;

} // namespace interprocess

namespace container {
using boost::container::basic_string;
} // namespace container

} // namespace boost
Loading