Skip to content

Commit

Permalink
drop noexcept on other unimplemented entry-adding methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ban-nobuhiro committed Oct 20, 2023
1 parent 8ae6253 commit 8f81bb1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions include/limestone/api/log_channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class log_channel {
* @param large_objects (optional) the list of large objects associated with the entry to be added
* @attention this function is not thread-safe.
*/
void add_entry(storage_id_type storage_id, std::string_view key, std::string_view value, write_version_type write_version, const std::vector<large_object_input>& large_objects) noexcept;
void add_entry(storage_id_type storage_id, std::string_view key, std::string_view value, write_version_type write_version, const std::vector<large_object_input>& large_objects);

/**
* @brief add an entry indicating the deletion of entries
Expand All @@ -104,7 +104,7 @@ class log_channel {
* @attention this function is not thread-safe.
* @impl this operation may be ignored.
*/
void add_storage(storage_id_type storage_id, write_version_type write_version) noexcept;
void add_storage(storage_id_type storage_id, write_version_type write_version);

/**
* @brief add an entry indicating the deletion of the specified storage and all entries for that storage
Expand All @@ -114,7 +114,7 @@ class log_channel {
* @note no deletion operation is performed on the entry that has been added to the current persistent session, instead,
* the target entries are treated as if they do not exist in the recover() operation from the log stored in the current persistent session.
*/
void remove_storage(storage_id_type storage_id, write_version_type write_version) noexcept;
void remove_storage(storage_id_type storage_id, write_version_type write_version);

/**
* @brief add an entry indicating the deletion of all entries contained in the specified storage
Expand All @@ -124,7 +124,7 @@ class log_channel {
* @note no deletion operation is performed on the entry that has been added to the current persistent session, instead,
* the target entries are treated as if they do not exist in the recover() operation from the log stored in the current persistent session.
*/
void truncate_storage(storage_id_type storage_id, write_version_type write_version) noexcept;
void truncate_storage(storage_id_type storage_id, write_version_type write_version);

/**
* @brief this is for test purpose only, must not be used for any purpose other than testing
Expand Down
16 changes: 8 additions & 8 deletions src/limestone/log_channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,29 +85,29 @@ void log_channel::add_entry(storage_id_type storage_id, std::string_view key, st
write_version_ = write_version;
}

void log_channel::add_entry([[maybe_unused]] storage_id_type storage_id, [[maybe_unused]] std::string_view key, [[maybe_unused]] std::string_view value, [[maybe_unused]] write_version_type write_version, [[maybe_unused]] const std::vector<large_object_input>& large_objects) noexcept {
void log_channel::add_entry([[maybe_unused]] storage_id_type storage_id, [[maybe_unused]] std::string_view key, [[maybe_unused]] std::string_view value, [[maybe_unused]] write_version_type write_version, [[maybe_unused]] const std::vector<large_object_input>& large_objects) {
LOG_LP(ERROR) << "not implemented";
std::abort(); // FIXME
throw std::runtime_error("not implemented"); // FIXME
};

void log_channel::remove_entry(storage_id_type storage_id, std::string_view key, write_version_type write_version) {
log_entry::write_remove(strm_, storage_id, key, write_version);
write_version_ = write_version;
}

void log_channel::add_storage([[maybe_unused]] storage_id_type storage_id, [[maybe_unused]] write_version_type write_version) noexcept {
void log_channel::add_storage([[maybe_unused]] storage_id_type storage_id, [[maybe_unused]] write_version_type write_version) {
LOG_LP(ERROR) << "not implemented";
std::abort(); // FIXME
throw std::runtime_error("not implemented"); // FIXME
}

void log_channel::remove_storage([[maybe_unused]] storage_id_type storage_id, [[maybe_unused]] write_version_type write_version) noexcept {
void log_channel::remove_storage([[maybe_unused]] storage_id_type storage_id, [[maybe_unused]] write_version_type write_version) {
LOG_LP(ERROR) << "not implemented";
std::abort(); // FIXME
throw std::runtime_error("not implemented"); // FIXME
}

void log_channel::truncate_storage([[maybe_unused]] storage_id_type storage_id, [[maybe_unused]] write_version_type write_version) noexcept {
void log_channel::truncate_storage([[maybe_unused]] storage_id_type storage_id, [[maybe_unused]] write_version_type write_version) {
LOG_LP(ERROR) << "not implemented";
std::abort(); // FIXME
throw std::runtime_error("not implemented"); // FIXME
}

boost::filesystem::path log_channel::file_path() const noexcept {
Expand Down

0 comments on commit 8f81bb1

Please sign in to comment.