Skip to content

Commit

Permalink
(wip) bugfix regarding base-path
Browse files Browse the repository at this point in the history
  • Loading branch information
KIwabuchi committed Dec 7, 2023
1 parent d2e6789 commit 45c3f92
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/metall/ext/privateer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ class privateer_segment_storage {
void *const vm_region,
[[maybe_unused]] const std::size_t initial_segment_size_hint) {
assert(!priv_inited());
m_base_path = parse_path(base_path).first;
init_privateer_datastore(base_path);

init_privateer_datastore(m_base_path);
m_base_path = parse_path(base_path).first;

// TODO: align those values to the page size instead of aborting
if (vm_region_size % page_size() != 0 ||
Expand Down Expand Up @@ -243,13 +243,13 @@ class privateer_segment_storage {
std::abort(); // Fatal error
}

init_privateer_datastore(base_path);

m_base_path = parse_path(base_path).first;
m_vm_region_size = vm_region_size;
m_segment = vm_region;
m_read_only = read_only;

init_privateer_datastore(m_base_path);

const auto file_name = m_base_path; // priv_make_file_name(m_base_path);
if (!mdtl::file_exist(file_name)) {
std::cerr << "Segment file does not exist" << std::endl;
Expand Down

0 comments on commit 45c3f92

Please sign in to comment.