Skip to content

Commit 07745e1

Browse files
committed
feat: add instance_id to configuration
project-tsurugi/tsurugi-issues#1409
1 parent 31428ab commit 07745e1

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

include/limestone/api/configuration.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#pragma once
1717

1818
#include <filesystem>
19+
#include <string>
20+
#include <string_view>
1921
#include <vector>
2022

2123
#include <boost/filesystem.hpp>
@@ -68,6 +70,11 @@ class configuration {
6870
*/
6971
void set_data_location(const std::filesystem::path& data_location) noexcept;
7072

73+
/**
74+
* @brief setter for instance_id
75+
* @param instance_id the instance id
76+
*/
77+
void set_instance_id(std::string_view instance_id) noexcept;
7178

7279
/**
7380
* @brief setter for recover_max_parallelism
@@ -82,6 +89,8 @@ class configuration {
8289

8390
boost::filesystem::path metadata_location_{};
8491

92+
std::string instance_id_{};
93+
8594
int recover_max_parallelism_{default_recover_max_parallelism};
8695

8796
friend class datastore;

src/limestone/configuration.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,8 @@ void configuration::set_data_location(const std::filesystem::path& data_location
4343
data_locations_.emplace_back(std::move(boost_location));
4444
}
4545

46+
void configuration::set_instance_id(std::string_view instance_id) noexcept {
47+
instance_id_ = instance_id;
48+
}
49+
4650
} // namespace limestone::api

0 commit comments

Comments
 (0)