Skip to content

Commit

Permalink
rename from touch() to increment_version()
Browse files Browse the repository at this point in the history
  • Loading branch information
ban-nobuhiro committed Jun 19, 2024
1 parent 711167f commit e3b3916
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @file interface_touch.h
* @file interface_increment_version.h
*/

#pragma once
Expand All @@ -18,8 +18,8 @@ namespace yakushima {
// begin - forward declaration
// end - forward declaration

[[maybe_unused]] static status touch(tree_instance* ti, // NOLINT
std::string_view key_view) {
[[maybe_unused]] static status increment_version(tree_instance* ti, // NOLINT
std::string_view key_view) {
retry_from_root:
base_node* root = ti->load_root_ptr();
if (root == nullptr) {
Expand Down Expand Up @@ -167,12 +167,12 @@ namespace yakushima {
goto retry_find_border; // NOLINT
}

[[maybe_unused]] static status touch(std::string_view storage_name, // NOLINT
std::string_view key_view) {
[[maybe_unused]] static status increment_version(std::string_view storage_name, // NOLINT
std::string_view key_view) {
tree_instance* ti{};
status ret{storage::find_storage(storage_name, &ti)};
if (status::OK != ret) { return status::WARN_STORAGE_NOT_EXIST; }
return touch(ti, key_view);
return increment_version(ti, key_view);
}

} // namespace yakushima
6 changes: 3 additions & 3 deletions include/kvs.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#include "interface_display.h"
#include "interface_get.h"
#include "interface_helper.h"
#include "interface_increment_version.h"
#include "interface_put.h"
#include "interface_remove.h"
#include "interface_scan.h"
#include "interface_touch.h"
#include "storage.h"
#include "storage_impl.h"

Expand Down Expand Up @@ -221,8 +221,8 @@ put(Token token, std::string_view storage_name, // NOLINT
* @return status::WARN_STORAGE_NOT_EXIST The target storage of this operation
* does not exist.
*/
[[maybe_unused]] static status touch(std::string_view storage_name, // NOLINT
std::string_view key_view);
[[maybe_unused]] static status increment_version(std::string_view storage_name, // NOLINT
std::string_view key_view);

/**
* TODO : add new 3 modes : try-mode : 1 trial : wait-mode : try until success : mid-mode
Expand Down

0 comments on commit e3b3916

Please sign in to comment.