From 994214018395bd31fd7b0c3b1d44ddb053eb0c0c Mon Sep 17 00:00:00 2001 From: Ryoji Kurosawa Date: Wed, 26 Jun 2024 16:11:11 +0900 Subject: [PATCH] style: remove trailing blanks, keep final new line --- bench/yakushima.cpp | 2 +- build_tools/ubuntu.deps | 2 +- cmake/FindTBB.cmake | 2 +- include/base_node.h | 4 +- include/border_node.h | 4 +- include/common_helper.h | 2 +- include/concurrent_queue.h | 2 +- include/config.h | 2 +- include/destroy_manager.h | 2 +- include/epoch.h | 2 +- include/interface_destroy.h | 2 +- include/interface_display.h | 2 +- include/interface_get.h | 2 +- include/interface_helper.h | 2 +- include/interface_put.h | 2 +- include/interface_remove.h | 8 +-- include/interface_scan.h | 2 +- include/interior_node.h | 2 +- include/kvs.h | 64 +++++++++---------- include/link_or_value.h | 20 +++--- include/log.h | 2 +- include/manager_thread.h | 2 +- include/permutation.h | 2 +- include/scan_helper.h | 32 +++++----- include/scheme.h | 4 +- include/storage.h | 2 +- include/storage_impl.h | 2 +- include/thread_info.h | 4 +- include/thread_info_table.h | 16 ++--- include/tree_instance.h | 2 +- include/value.h | 16 ++--- include/version.h | 2 +- .../put_get_scan_remove_long_key_test.cpp | 2 +- test/display/display_test.cpp | 2 +- .../multi_thread_delete_100_key_test.cpp | 2 +- .../multi_thread_delete_100k_key_test.cpp | 2 +- .../multi_thread_delete_10_key_test.cpp | 2 +- .../delete/multi_thread_delete_1_key_test.cpp | 2 +- .../multi_thread_delete_1m_key_test.cpp | 2 +- .../multi_thread_delete_200_key_test.cpp | 2 +- .../multi_thread_delete_20_key_test.cpp | 2 +- .../multi_thread_delete_one_border_test.cpp | 18 +++--- .../multi_thread_delete_two_border_test.cpp | 10 +-- .../put/multi_thread_put_100k_key_test.cpp | 2 +- ...ulti_thread_put_delete_one_border_test.cpp | 6 +- ...ulti_thread_put_delete_two_border_test.cpp | 6 +- .../multi_thread_put_delete_get_test.cpp | 2 +- ..._thread_put_delete_get_two_border_test.cpp | 4 +- ...ead_put_delete_scan_many_interior_test.cpp | 6 +- ...thread_put_delete_scan_one_border_test.cpp | 2 +- ...read_put_delete_scan_one_interior_test.cpp | 2 +- ...lete_scan_one_interior_two_border_test.cpp | 2 +- ...thread_put_delete_scan_two_border_test.cpp | 2 +- test/put/put_test.cpp | 2 +- test/scan/scan_detect_phantom_test.cpp | 2 +- test/scan/scan_long_key_test.cpp | 2 +- test/scan/scan_test.cpp | 12 ++-- test/tsurugi_issue/tsurugi_issue251_test.cpp | 2 +- test/tsurugi_issue/tsurugi_issue672_test.cpp | 2 +- 59 files changed, 159 insertions(+), 159 deletions(-) diff --git a/bench/yakushima.cpp b/bench/yakushima.cpp index 550ac70..dd3949a 100644 --- a/bench/yakushima.cpp +++ b/bench/yakushima.cpp @@ -439,4 +439,4 @@ int main(int argc, char* argv[]) { invoke_leader(); return 0; -} \ No newline at end of file +} diff --git a/build_tools/ubuntu.deps b/build_tools/ubuntu.deps index 3de4a18..9906e46 100644 --- a/build_tools/ubuntu.deps +++ b/build_tools/ubuntu.deps @@ -12,4 +12,4 @@ libgflags-dev libgoogle-glog-dev libspdlog-dev libtbb-dev -ninja-build \ No newline at end of file +ninja-build diff --git a/cmake/FindTBB.cmake b/cmake/FindTBB.cmake index ee9d123..8bfa633 100644 --- a/cmake/FindTBB.cmake +++ b/cmake/FindTBB.cmake @@ -26,4 +26,4 @@ if (TBB_FOUND) endif () endif () unset(TBB_LIBRARY_FILE CACHE) -unset(TBB_INCLUDE_DIR CACHE) \ No newline at end of file +unset(TBB_INCLUDE_DIR CACHE) diff --git a/include/base_node.h b/include/base_node.h index c9092f9..336e7a9 100644 --- a/include/base_node.h +++ b/include/base_node.h @@ -79,7 +79,7 @@ class base_node { // NOLINT /** * @brief Collect the memory usage of this partial tree. - * + * * @param level the level of this node in the tree. * @param mem_stat the stack of memory usage for each level. */ @@ -304,4 +304,4 @@ class base_node { // NOLINT std::array key_length_{}; }; -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/border_node.h b/include/border_node.h index e0d4d97..679f6af 100644 --- a/include/border_node.h +++ b/include/border_node.h @@ -46,7 +46,7 @@ class alignas(CACHE_LINE_SIZE) border_node final : public base_node { // NOLINT ti->get_gc_info().push_value_container( {ti->get_begin_epoch(), v_ptr, v_len, v_align}); /** - * clear for preventing heap use after free by reference of + * clear for preventing heap use after free by reference of * need_delete */ lv_.at(pos).init_lv(); @@ -221,7 +221,7 @@ class alignas(CACHE_LINE_SIZE) border_node final : public base_node { // NOLINT /** * @brief Collect the memory usage of this partial tree. - * + * * @param level the level of this node in the tree. * @param mem_stat the stack of memory usage for each level. */ diff --git a/include/common_helper.h b/include/common_helper.h index 8394e95..8cb2dc8 100644 --- a/include/common_helper.h +++ b/include/common_helper.h @@ -85,4 +85,4 @@ find_border(base_node* const root, const key_slice_type key_slice, return std::make_tuple(dynamic_cast(n), v); } -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/concurrent_queue.h b/include/concurrent_queue.h index 294afb4..5ea7846 100644 --- a/include/concurrent_queue.h +++ b/include/concurrent_queue.h @@ -21,4 +21,4 @@ class concurrent_queue { // NOLINT : about constructor // End : intel tbb }; -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/config.h b/include/config.h index 3d68f57..898588d 100644 --- a/include/config.h +++ b/include/config.h @@ -16,4 +16,4 @@ namespace yakushima { #endif -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/destroy_manager.h b/include/destroy_manager.h index 3029b8e..741bcaa 100644 --- a/include/destroy_manager.h +++ b/include/destroy_manager.h @@ -36,4 +36,4 @@ class destroy_manager { static inline std::atomic destroy_threads_num_{0}; // NOLINT }; -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/epoch.h b/include/epoch.h index 5a03880..a53068b 100644 --- a/include/epoch.h +++ b/include/epoch.h @@ -23,4 +23,4 @@ class epoch_management { static inline std::atomic epoch_{1}; // NOLINT }; -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/interface_destroy.h b/include/interface_destroy.h index 7ff08b5..c8bf9ed 100644 --- a/include/interface_destroy.h +++ b/include/interface_destroy.h @@ -39,4 +39,4 @@ namespace yakushima { return status::OK_DESTROY_ALL; } -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/interface_display.h b/include/interface_display.h index d774328..880d7b7 100644 --- a/include/interface_display.h +++ b/include/interface_display.h @@ -164,4 +164,4 @@ static void display_tree_instance(std::stringstream& ss, tree_instance* ti) { yakushima_log_exit << "display"; } -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/interface_get.h b/include/interface_get.h index 5db1754..7c3b9ee 100644 --- a/include/interface_get.h +++ b/include/interface_get.h @@ -140,4 +140,4 @@ get(std::string_view storage_name, std::string_view key_view, return get(ti, key_view, out, checked_version); } -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/interface_helper.h b/include/interface_helper.h index 769db87..b7a26b8 100644 --- a/include/interface_helper.h +++ b/include/interface_helper.h @@ -48,4 +48,4 @@ mem_usage(std::string_view storage_name) { return mem_stat; } -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/interface_put.h b/include/interface_put.h index 658004c..ade0820 100644 --- a/include/interface_put.h +++ b/include/interface_put.h @@ -275,4 +275,4 @@ put(Token token, std::string_view storage_name, // NOLINT arg_value_length, created_value_ptr, value_align, inserted_node_version_ptr); } -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/interface_remove.h b/include/interface_remove.h index cbbe0e4..c27cf31 100644 --- a/include/interface_remove.h +++ b/include/interface_remove.h @@ -71,8 +71,8 @@ namespace yakushima { if (target_border == nullptr) { // TODO /** - * This code path is not expected to be reached. However, sometimes - * this code path is reached. You may need to make appropriate use of + * This code path is not expected to be reached. However, sometimes + * this code path is reached. You may need to make appropriate use of * compiler fences. */ goto retry_from_root; // NOLINT @@ -95,7 +95,7 @@ namespace yakushima { if (v_at_fetch_lv.get_vsplit() != v_at_fb.get_vsplit() || (v_at_fetch_lv.get_deleted() && !v_at_fetch_lv.get_root())) { /** - * It may be change the correct border between atomically fetching border node + * It may be change the correct border between atomically fetching border node * and atomically fetching lv. */ goto retry_from_root; // NOLINT @@ -175,4 +175,4 @@ namespace yakushima { return remove(token, ti, key_view); } -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/interface_scan.h b/include/interface_scan.h index 8bb3399..37b7a49 100644 --- a/include/interface_scan.h +++ b/include/interface_scan.h @@ -143,4 +143,4 @@ scan(std::string_view storage_name, std::string_view l_key, // NOLINT max_size); } -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/interior_node.h b/include/interior_node.h index 5c09c51..7d296a0 100644 --- a/include/interior_node.h +++ b/include/interior_node.h @@ -150,7 +150,7 @@ class alignas(CACHE_LINE_SIZE) interior_node final // NOLINT /** * @brief Collect the memory usage of this partial tree. - * + * * @param level the level of this node in the tree. * @param mem_stat the stack of memory usage for each level. */ diff --git a/include/kvs.h b/include/kvs.h index bbad041..dc79788 100644 --- a/include/kvs.h +++ b/include/kvs.h @@ -143,15 +143,15 @@ list_storages(std::vector>& out) { * @param[in] key_view The key_view of key-value. * @param[out] out The result about pointer to value and value size. * The address obtained here can be accessed safely until the Token entered at the time of address acquisition leaves. - * @param[out] checked_version The version information at Status::WARN_NOT_EXIST. - * If you set non-nullptr, yakushima write there. If not, yakushima write nothing. - * This is for phantom avoidance. If transaction engine did point read and dind't find entry, + * @param[out] checked_version The version information at Status::WARN_NOT_EXIST. + * If you set non-nullptr, yakushima write there. If not, yakushima write nothing. + * This is for phantom avoidance. If transaction engine did point read and dind't find entry, * it can't read verify but if there is a masstree node, it can do node verify. * The address obtained here can be accessed safely until the Token entered at the time of address acquisition leaves. * @return std::status::OK success - * @return status::WARN_NOT_EXIST The target storage of this operation exists, + * @return status::WARN_NOT_EXIST The target storage of this operation exists, * but the target entry of the storage does not exist. - * @return status::WARN_STORAGE_NOT_EXIST The target storage of this operation + * @return status::WARN_STORAGE_NOT_EXIST The target storage of this operation * does not exist. */ template @@ -183,15 +183,15 @@ get(std::string_view storage_name, // NOLINT * static_cast(alignof(ValueType)). * @param[in] unique_restriction If this is true, you can't put same key. If you * update key, you should execute remove and put. - * @param[out] inserted_node_version_ptr The pointer to version of the inserted - * node. It may be used to find out difference of the version between some + * @param[out] inserted_node_version_ptr The pointer to version of the inserted + * node. It may be used to find out difference of the version between some * operations. Default is @a nullptr. If split occurs due to this insert, this * point to old border node. * The address obtained here can be accessed safely until the Token entered at the time of address acquisition leaves. * @return status::OK success. * @return status::WARN_UNIQUE_RESTRICTION The key-value whose key is same to given key * already exists. - * @return status::WARN_STORAGE_NOT_EXIST The target storage of this operation + * @return status::WARN_STORAGE_NOT_EXIST The target storage of this operation * does not exist. */ template @@ -209,9 +209,9 @@ put(Token token, std::string_view storage_name, // NOLINT * @param[in] key_view The key_view of key-value. * @return status::OK success * @return status::OK_ROOT_IS_NULL No existing tree. - * @return status::OK_NOT_FOUND The target storage exists, but the target + * @return status::OK_NOT_FOUND The target storage exists, but the target * entry does not exist. - * @return status::WARN_STORAGE_NOT_EXIST The target storage of this operation + * @return status::WARN_STORAGE_NOT_EXIST The target storage of this operation * does not exist. */ [[maybe_unused]] static status remove(Token token, // NOLINT @@ -224,45 +224,45 @@ put(Token token, std::string_view storage_name, // NOLINT */ /** * @brief scan range between @a l_key and @a r_key. - * @tparam ValueType The returned pointer is cast to the given type information + * @tparam ValueType The returned pointer is cast to the given type information * before it is returned. * @param[in] l_key An argument that specifies the left endpoint. - * @param[in] l_end If this argument is scan_endpoint::EXCLUSIVE, the interval - * does not include the endpoint. If this argument is scan_endpoint::INCLUSIVE, - * the interval contains the endpoint. If this is scan_endpoint::INF, there is + * @param[in] l_end If this argument is scan_endpoint::EXCLUSIVE, the interval + * does not include the endpoint. If this argument is scan_endpoint::INCLUSIVE, + * the interval contains the endpoint. If this is scan_endpoint::INF, there is * no limit on the interval in left direction. And ignore @a l_key. * @param[in] r_key An argument that specifies the right endpoint. * @note If r_key diff --git a/include/link_or_value.h b/include/link_or_value.h index bc3172c..7752c19 100644 --- a/include/link_or_value.h +++ b/include/link_or_value.h @@ -68,7 +68,7 @@ class link_or_value { /** * @brief Collect the memory usage of this record. - * + * * @param[in] level The level of this node in the tree. * @param[in,out] mem_stat The stack of memory usage for each level. */ @@ -91,10 +91,10 @@ class link_or_value { /** * @brief Get the root node of the next layer. - * + * * Note that this function uses the atomic operation (i.e., load) for dealing with * concurrent modifications. - * + * * @retval The root node of the next layer if exists. * @retval nullptr otherwise. */ @@ -106,10 +106,10 @@ class link_or_value { /** * @brief Get the value pointer. - * + * * Note that this function uses the atomic operation (i.e., load) for dealing with * concurrent modifications. - * + * * @retval The pointer of the contained value if exists. * @retval nullptr otherwise. */ @@ -121,11 +121,11 @@ class link_or_value { /** * @brief Initialize the payload to zero. - * + * */ void init_lv() { child_or_v_ = kValPtrFlag; } - /** + /** * @details This is move process. * @param nlv */ @@ -174,13 +174,13 @@ class link_or_value { private: /** * @brief A flag for indicating that the next layer exists. - * + * */ static constexpr uintptr_t kChildFlag = 0b10UL << 62UL; /** * @brief A flag for indicating that the next layer exists. - * + * */ static constexpr uintptr_t kValPtrFlag = 0b01UL << 62UL; @@ -194,4 +194,4 @@ class link_or_value { uintptr_t child_or_v_{kValPtrFlag}; }; -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/log.h b/include/log.h index ac70158..6f80eaa 100644 --- a/include/log.h +++ b/include/log.h @@ -39,4 +39,4 @@ static constexpr std::int32_t log_trace = 50; #define yakushima_log_exit \ VLOG(log_trace) << std::boolalpha << log_location_prefix << "<--" // NOLINT -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/manager_thread.h b/include/manager_thread.h index 5cf203a..59d1fd2 100644 --- a/include/manager_thread.h +++ b/include/manager_thread.h @@ -98,4 +98,4 @@ class epoch_manager { static inline std::thread kGCThread; // NOLINT : can't become constexpr }; -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/permutation.h b/include/permutation.h index 65d005b..213b0b9 100644 --- a/include/permutation.h +++ b/include/permutation.h @@ -237,4 +237,4 @@ class permutation { std::atomic body_; }; -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/scan_helper.h b/include/scan_helper.h index 943988f..86c3f80 100644 --- a/include/scan_helper.h +++ b/include/scan_helper.h @@ -68,7 +68,7 @@ scan(base_node* const root, const std::string_view l_key, } /** - * For retry of failing optimistic verify, it must erase parts of + * For retry of failing optimistic verify, it must erase parts of * tuple_list and node vec. clear between initial_size... and current size. * about tuple_list. */ @@ -181,7 +181,7 @@ scan_border(border_node** const target, const std::string_view l_key, initial_size_of_node_version_vec = node_version_vec->size(); } /** - * For retry of failing optimistic verify, it must erase parts of + * For retry of failing optimistic verify, it must erase parts of * tuple_list and node vec. clear between initial_size... and current size. * about tuple_list. */ @@ -207,7 +207,7 @@ scan_border(border_node** const target, const std::string_view l_key, retry: /** - * This is used below loop for logging whether this scan catches some + * This is used below loop for logging whether this scan catches some * elements in this node. */ bool tuple_pushed_num{false}; @@ -234,7 +234,7 @@ scan_border(border_node** const target, const std::string_view l_key, reinterpret_cast(&ks), // NOLINT kl < sizeof(key_slice_type) ? kl : sizeof(key_slice_type)); /** - * If the key is complete (kl < sizeof(key_slice_type)), the key + * If the key is complete (kl < sizeof(key_slice_type)), the key * slice must be copied by the size of key length. * Otherwise, sizeof key_slice_type. */ @@ -244,7 +244,7 @@ scan_border(border_node** const target, const std::string_view l_key, base_node* next_layer = lv->get_next_layer(); node_version64* node_version_ptr = bn->get_version_ptr(); /** - * This verification may seem verbose, but it can also be considered + * This verification may seem verbose, but it can also be considered * an early abort. */ status check_status = scan_check_retry(bn, v_at_fb); @@ -329,13 +329,13 @@ scan_border(border_node** const target, const std::string_view l_key, value::get_len(vp))); if (node_version_vec != nullptr) { /** - * note: + * note: * std::get<1>(node_version_vec.back()) != node_version_ptr - * Adding this can reduce redundant emplace_back. However, - * the correspondence between the value of the scan result - * and the pointer to the node version becomes unknown, - * making it impossible to perform node verify according - * to the actual situation read by the transaction + * Adding this can reduce redundant emplace_back. However, + * the correspondence between the value of the scan result + * and the pointer to the node version becomes unknown, + * making it impossible to perform node verify according + * to the actual situation read by the transaction * execution engine. */ node_version_vec->emplace_back( @@ -388,8 +388,8 @@ scan_border(border_node** const target, const std::string_view l_key, // pass right endpoint. if (!tuple_pushed_num && node_version_vec != nullptr) { /** - * Since it is a rightmost node included in the range, it is - * included in the phantom verification. However, there were + * Since it is a rightmost node included in the range, it is + * included in the phantom verification. However, there were * no elements included in the range. */ node_version_vec->emplace_back( @@ -403,8 +403,8 @@ scan_border(border_node** const target, const std::string_view l_key, if (!tuple_pushed_num && node_version_vec != nullptr) { /** - * Since it is a leftmost node included in the range, it is included - * in the phantom verification. However, there were no elements + * Since it is a leftmost node included in the range, it is included + * in the phantom verification. However, there were no elements * included in the range. */ node_version_vec->emplace_back( @@ -437,4 +437,4 @@ scan_border(border_node** const target, const std::string_view l_key, return status::OK_SCAN_CONTINUE; } -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/scheme.h b/include/scheme.h index 40a24fa..4ee9e5d 100644 --- a/include/scheme.h +++ b/include/scheme.h @@ -108,7 +108,7 @@ enum class status : std::int32_t { ERR_BOUNDARY, /** * @brief fatal error - * + * */ ERR_FATAL, /** @@ -209,4 +209,4 @@ constexpr bool is_inlinable() { return false; } -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/storage.h b/include/storage.h index a5b9de9..d3a29c5 100644 --- a/include/storage.h +++ b/include/storage.h @@ -33,4 +33,4 @@ class storage { static inline tree_instance storages_; // NOLINT }; -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/storage_impl.h b/include/storage_impl.h index 20e65f2..fcb0161 100644 --- a/include/storage_impl.h +++ b/include/storage_impl.h @@ -98,4 +98,4 @@ status storage::list_storages( return status::OK; } -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/thread_info.h b/include/thread_info.h index 654e0fb..d4018d2 100644 --- a/include/thread_info.h +++ b/include/thread_info.h @@ -52,7 +52,7 @@ class alignas(CACHE_LINE_SIZE) thread_info { private: /** - * @details This is updated by worker and is read by leader. If the value is 0, + * @details This is updated by worker and is read by leader. If the value is 0, * it is invalid. */ std::atomic begin_epoch_{0}; @@ -60,4 +60,4 @@ class alignas(CACHE_LINE_SIZE) thread_info { garbage_collection gc_info_; }; -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/thread_info_table.h b/include/thread_info_table.h index 441c9ff..e772d2d 100644 --- a/include/thread_info_table.h +++ b/include/thread_info_table.h @@ -15,10 +15,10 @@ class thread_info_table { public: /** * @brief Allocates a free session. - * @param[out] token If the return value of the function is status::OK, + * @param[out] token If the return value of the function is status::OK, * then the token is the acquired session. * @return status::OK success. - * @return status::WARN_MAX_SESSIONS The maximum number of sessions is already up + * @return status::WARN_MAX_SESSIONS The maximum number of sessions is already up * and running. */ static status assign_thread_info(Token& token) { @@ -66,7 +66,7 @@ class thread_info_table { /** * @brief initialize thread_info_table_. - * @pre global epoch is not yet functional because it assigns 0 to begin_epoch as + * @pre global epoch is not yet functional because it assigns 0 to begin_epoch as * the initial value. * @return void */ @@ -78,11 +78,11 @@ class thread_info_table { } /** - * @details When @a token points to an invalid memory location, an error occurs - * if @a token is referenced. - * To avoid this, it scans the table. + * @details When @a token points to an invalid memory location, an error occurs + * if @a token is referenced. + * To avoid this, it scans the table. * So if @token is invalid one, return status::WARN_INVALID_TOKEN. - * @tparam interior_node Class information is given at compile time to eliminate + * @tparam interior_node Class information is given at compile time to eliminate * the dependency between header files. * @tparam border_node Class information is given at compile time to eliminate the * dependency between header files. @@ -107,4 +107,4 @@ class thread_info_table { thread_info_table_; // NOLINT }; -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/tree_instance.h b/include/tree_instance.h index b924005..8beec0e 100644 --- a/include/tree_instance.h +++ b/include/tree_instance.h @@ -27,4 +27,4 @@ class tree_instance { base_node* root_{nullptr}; }; -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/value.h b/include/value.h index e98bdbd..baabc00 100644 --- a/include/value.h +++ b/include/value.h @@ -12,7 +12,7 @@ class value { public: /** * @brief Create a new value instance with dynamic memory allocation. - * + * * @param[in] in_ptr The source address of a new value. * @param[in] v_len The length of a new value. * @param[in] v_align The alignment size of a new value. @@ -51,10 +51,10 @@ class value { /** * @brief Release the given value pointer. - * + * * This function computes the actual size and alignment of the given value to * release the allocated memory correctly. - * + * * @param[in] val The value pointer to be deleted. */ static void delete_value(value* val) { @@ -122,7 +122,7 @@ class value { /** * @brief Set the flag for deletion off. - * + * * @param[in] val The target value pointer. */ static void remove_delete_flag(value* val) { @@ -133,13 +133,13 @@ class value { private: /** * @brief A flag for indicating that the next layer exists. - * + * */ static constexpr uintptr_t kValPtrFlag = 0b01UL << 62UL; /** * @brief Internal constructor for setting header information. - * + * * @param[in] v_len The length of a new value. * @param[in] v_align The alignment size of a new value. */ @@ -163,7 +163,7 @@ class value { /** * @brief The alignment size of the contained value. - * + * * Note that the minimum alignment is 8 bytes to retain the header region. */ std::uint16_t align_{0}; @@ -174,4 +174,4 @@ class value { bool need_delete_{false}; }; -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/include/version.h b/include/version.h index 285b7a5..15601c9 100644 --- a/include/version.h +++ b/include/version.h @@ -392,4 +392,4 @@ class node_version64 { std::atomic body_; }; -} // namespace yakushima \ No newline at end of file +} // namespace yakushima diff --git a/test/delete_get_put_scan/put_get_scan_remove_long_key_test.cpp b/test/delete_get_put_scan/put_get_scan_remove_long_key_test.cpp index b7a5139..e6bf02d 100644 --- a/test/delete_get_put_scan/put_get_scan_remove_long_key_test.cpp +++ b/test/delete_get_put_scan/put_get_scan_remove_long_key_test.cpp @@ -84,4 +84,4 @@ TEST_F(put_get_scan_remove_long_key_test, put_get) { // NOLINT ASSERT_EQ(status::OK, leave(s)); } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/display/display_test.cpp b/test/display/display_test.cpp index a3fe010..f7bc66b 100644 --- a/test/display/display_test.cpp +++ b/test/display/display_test.cpp @@ -91,4 +91,4 @@ TEST_F(display_test, simple) { // NOLINT ASSERT_OK(leave(t)); } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/multi_thread/delete/multi_thread_delete_100_key_test.cpp b/test/multi_thread/delete/multi_thread_delete_100_key_test.cpp index 024ce13..743ebf7 100644 --- a/test/multi_thread/delete/multi_thread_delete_100_key_test.cpp +++ b/test/multi_thread/delete/multi_thread_delete_100_key_test.cpp @@ -267,4 +267,4 @@ TEST_F(multi_thread_delete_100_key_test, shuffled_100_key) { // NOLINT } } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/multi_thread/delete/multi_thread_delete_100k_key_test.cpp b/test/multi_thread/delete/multi_thread_delete_100k_key_test.cpp index 8e61e6c..4ae5227 100644 --- a/test/multi_thread/delete/multi_thread_delete_100k_key_test.cpp +++ b/test/multi_thread/delete/multi_thread_delete_100k_key_test.cpp @@ -195,4 +195,4 @@ TEST_F(multi_thread_delete_100k_key_test, 100k_key_shuffle) { // NOLINT } } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/multi_thread/delete/multi_thread_delete_10_key_test.cpp b/test/multi_thread/delete/multi_thread_delete_10_key_test.cpp index cf1794d..9a11131 100644 --- a/test/multi_thread/delete/multi_thread_delete_10_key_test.cpp +++ b/test/multi_thread/delete/multi_thread_delete_10_key_test.cpp @@ -264,4 +264,4 @@ TEST_F(multi_thread_delete_10_key_test, shuffled_10_key) { // NOLINT } } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/multi_thread/delete/multi_thread_delete_1_key_test.cpp b/test/multi_thread/delete/multi_thread_delete_1_key_test.cpp index 6351c5a..9df9958 100644 --- a/test/multi_thread/delete/multi_thread_delete_1_key_test.cpp +++ b/test/multi_thread/delete/multi_thread_delete_1_key_test.cpp @@ -79,4 +79,4 @@ TEST_F(multi_thread_delete_1_key_test, 1_key) { // NOLINT destroy(); } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/multi_thread/delete/multi_thread_delete_1m_key_test.cpp b/test/multi_thread/delete/multi_thread_delete_1m_key_test.cpp index a400491..8bded83 100644 --- a/test/multi_thread/delete/multi_thread_delete_1m_key_test.cpp +++ b/test/multi_thread/delete/multi_thread_delete_1m_key_test.cpp @@ -195,4 +195,4 @@ TEST_F(multi_thread_delete_1m_key_test, 1m_key_shuffle) { // NOLINT } } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/multi_thread/delete/multi_thread_delete_200_key_test.cpp b/test/multi_thread/delete/multi_thread_delete_200_key_test.cpp index 2efebb2..7b98ee7 100644 --- a/test/multi_thread/delete/multi_thread_delete_200_key_test.cpp +++ b/test/multi_thread/delete/multi_thread_delete_200_key_test.cpp @@ -214,4 +214,4 @@ TEST_F(multi_thread_delete_200_key_test, 200_key_shuffle) { // NOLINT } } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/multi_thread/delete/multi_thread_delete_20_key_test.cpp b/test/multi_thread/delete/multi_thread_delete_20_key_test.cpp index f45547c..9c0e34d 100644 --- a/test/multi_thread/delete/multi_thread_delete_20_key_test.cpp +++ b/test/multi_thread/delete/multi_thread_delete_20_key_test.cpp @@ -266,4 +266,4 @@ TEST_F(multi_thread_delete_20_key_test, shuffled_20_key) { // NOLINT } } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/multi_thread/delete/multi_thread_delete_one_border_test.cpp b/test/multi_thread/delete/multi_thread_delete_one_border_test.cpp index a3e0789..e55ce30 100644 --- a/test/multi_thread/delete/multi_thread_delete_one_border_test.cpp +++ b/test/multi_thread/delete/multi_thread_delete_one_border_test.cpp @@ -39,8 +39,8 @@ std::string test_storage_name{"1"}; // NOLINT TEST_F(multi_thread_delete_one_border_test, one_border) { // NOLINT /** - * Initial state : multi threads put same null char key slices and - * different key length to multiple border. Concurrent remove against + * Initial state : multi threads put same null char key slices and + * different key length to multiple border. Concurrent remove against * initial state. */ constexpr std::size_t ary_size = 9; @@ -119,8 +119,8 @@ TEST_F(multi_thread_delete_one_border_test, one_border) { // NOLINT TEST_F(multi_thread_delete_one_border_test, one_border_shuffle) { // NOLINT /** - * Initial state : multi threads put same null char key slices and - * different key length to multiple border, which is using shuffled data. + * Initial state : multi threads put same null char key slices and + * different key length to multiple border, which is using shuffled data. * Concurrent remove against initial state. */ constexpr std::size_t ary_size = 9; @@ -203,8 +203,8 @@ TEST_F(multi_thread_delete_one_border_test, one_border_shuffle) { // NOLINT TEST_F(multi_thread_delete_one_border_test, test3) { // NOLINT /** - * Initial state : multi threads put same null char key slices and - * different key length to single border. Concurrent remove against + * Initial state : multi threads put same null char key slices and + * different key length to single border. Concurrent remove against * initial state. */ @@ -278,8 +278,8 @@ TEST_F(multi_thread_delete_one_border_test, test3) { // NOLINT TEST_F(multi_thread_delete_one_border_test, test4) { // NOLINT /** - * Initial state : multi threads put same null char key slices and - * different key length to single border, which is using shuffled data. + * Initial state : multi threads put same null char key slices and + * different key length to single border, which is using shuffled data. * Concurrent remove against initial state. */ @@ -353,4 +353,4 @@ TEST_F(multi_thread_delete_one_border_test, test4) { // NOLINT } } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/multi_thread/delete/multi_thread_delete_two_border_test.cpp b/test/multi_thread/delete/multi_thread_delete_two_border_test.cpp index 88210de..97cff71 100644 --- a/test/multi_thread/delete/multi_thread_delete_two_border_test.cpp +++ b/test/multi_thread/delete/multi_thread_delete_two_border_test.cpp @@ -113,7 +113,7 @@ TEST_F(multi_thread_delete_two_border_test, test5) { // NOLINT TEST_F(multi_thread_delete_two_border_test, test6) { // NOLINT /** - * Initial state : multi threads put until first split of border, which is + * Initial state : multi threads put until first split of border, which is * using shuffled data. Concurrent remove against initial state. */ @@ -189,7 +189,7 @@ TEST_F(multi_thread_delete_two_border_test, test6) { // NOLINT TEST_F(multi_thread_delete_two_border_test, test7) { // NOLINT /** - * Initial state : multi threads put between first split of border and + * Initial state : multi threads put between first split of border and * first split of interior. Concurrent remove against initial state. */ @@ -263,8 +263,8 @@ TEST_F(multi_thread_delete_two_border_test, test7) { // NOLINT TEST_F(multi_thread_delete_two_border_test, test8) { // NOLINT /** - * Initial state : multi threads put between first split of border and - * first split of interior, which is using shuffled data. Concurrent + * Initial state : multi threads put between first split of border and + * first split of interior, which is using shuffled data. Concurrent * remove against initial state. */ constexpr std::size_t ary_size = 100; @@ -338,4 +338,4 @@ TEST_F(multi_thread_delete_two_border_test, test8) { // NOLINT } } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/multi_thread/put/multi_thread_put_100k_key_test.cpp b/test/multi_thread/put/multi_thread_put_100k_key_test.cpp index 2130b35..869c9d7 100644 --- a/test/multi_thread/put/multi_thread_put_100k_key_test.cpp +++ b/test/multi_thread/put/multi_thread_put_100k_key_test.cpp @@ -159,4 +159,4 @@ TEST_F(multi_thread_put_100k_key_test, 100k_key_shuffle) { // NOLINT } } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/multi_thread/put_delete/multi_thread_put_delete_one_border_test.cpp b/test/multi_thread/put_delete/multi_thread_put_delete_one_border_test.cpp index fa4f18e..5a745c3 100644 --- a/test/multi_thread/put_delete/multi_thread_put_delete_one_border_test.cpp +++ b/test/multi_thread/put_delete/multi_thread_put_delete_one_border_test.cpp @@ -111,7 +111,7 @@ TEST_F(mtpdt, one_border) { // NOLINT TEST_F(mtpdt, one_border_shuffle) { // NOLINT /** - * concurrent put/delete same null char key slices and different key + * concurrent put/delete same null char key slices and different key * length by shuffled order to single border by multi threads. */ constexpr std::size_t ary_size = 9; @@ -201,7 +201,7 @@ TEST_F(mtpdt, one_border_shuffle) { // NOLINT TEST_F(mtpdt, one_border_random) { // NOLINT /** - * concurrent put/delete different char key slices to single border by + * concurrent put/delete different char key slices to single border by * multi threads. */ std::size_t th_nm{15}; @@ -251,4 +251,4 @@ TEST_F(mtpdt, one_border_random) { // NOLINT } } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/multi_thread/put_delete/multi_thread_put_delete_two_border_test.cpp b/test/multi_thread/put_delete/multi_thread_put_delete_two_border_test.cpp index 074590c..5f46877 100644 --- a/test/multi_thread/put_delete/multi_thread_put_delete_two_border_test.cpp +++ b/test/multi_thread/put_delete/multi_thread_put_delete_two_border_test.cpp @@ -36,7 +36,7 @@ std::string test_storage_name{"1"}; // NOLINT TEST_F(mtpdt, two_layer_two_border) { // NOLINT /** - * multiple put same null char key whose length is different each other + * multiple put same null char key whose length is different each other * against multiple border, which is across some layer. */ constexpr std::size_t ary_size = 15; @@ -398,7 +398,7 @@ TEST_F(mtpdt, // NOLINT TEST_F(mtpdt, // NOLINT concurrent_put_delete_between_none_and_interior_in_first_layer) { // NOLINT /** - * The number of puts that can be split only once and the deletes are + * The number of puts that can be split only once and the deletes are * repeated in multiple threads. Use shuffled data. */ constexpr std::size_t ary_size = key_slice_length + 1; @@ -576,4 +576,4 @@ TEST_F( // NOLINT } } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/multi_thread/put_delete_get/multi_thread_put_delete_get_test.cpp b/test/multi_thread/put_delete_get/multi_thread_put_delete_get_test.cpp index 251ff8c..a250935 100644 --- a/test/multi_thread/put_delete_get/multi_thread_put_delete_get_test.cpp +++ b/test/multi_thread/put_delete_get/multi_thread_put_delete_get_test.cpp @@ -146,4 +146,4 @@ TEST_F(mtpdgt, many_layer_many_interior_many_border) { // NOLINT } } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/multi_thread/put_delete_get/multi_thread_put_delete_get_two_border_test.cpp b/test/multi_thread/put_delete_get/multi_thread_put_delete_get_two_border_test.cpp index 5fa3a35..f337acf 100644 --- a/test/multi_thread/put_delete_get/multi_thread_put_delete_get_two_border_test.cpp +++ b/test/multi_thread/put_delete_get/multi_thread_put_delete_get_two_border_test.cpp @@ -42,7 +42,7 @@ std::string test_storage_name{"1"}; // NOLINT TEST_F(mtpdgt, two_border_null_key) { // NOLINT /** - * multiple put/delete/get same null char key whose length is different + * multiple put/delete/get same null char key whose length is different * each other against multiple border, which is across some layer. */ constexpr std::size_t ary_size = 15; @@ -232,4 +232,4 @@ TEST_F(mtpdgt, two_border_null_key_shuffle) { // NOLINT } } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_many_interior_test.cpp b/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_many_interior_test.cpp index ca50d68..c668de4 100644 --- a/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_many_interior_test.cpp +++ b/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_many_interior_test.cpp @@ -43,7 +43,7 @@ std::mutex debug_mtx; // NOLINT TEST_F(multi_thread_put_delete_scan_many_interior_test, // NOLINT many_interior) { // NOLINT /** - * concurrent put/delete/scan in the state between none to many split of + * concurrent put/delete/scan in the state between none to many split of * interior. */ @@ -190,7 +190,7 @@ TEST_F(multi_thread_put_delete_scan_many_interior_test, // NOLINT TEST_F(multi_thread_put_delete_scan_many_interior_test, // NOLINT many_interior_shuffle) { // NOLINT /** - * concurrent put/delete/scan in the state between none to many split of + * concurrent put/delete/scan in the state between none to many split of * interior with shuffle. */ @@ -311,4 +311,4 @@ TEST_F(multi_thread_put_delete_scan_many_interior_test, // NOLINT } } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_one_border_test.cpp b/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_one_border_test.cpp index ce0b8a0..6de766f 100644 --- a/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_one_border_test.cpp +++ b/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_one_border_test.cpp @@ -278,4 +278,4 @@ TEST_F(mtpdst, one_border_shuffle) { // NOLINT } } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_one_interior_test.cpp b/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_one_interior_test.cpp index 611505e..552e7b9 100644 --- a/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_one_interior_test.cpp +++ b/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_one_interior_test.cpp @@ -157,4 +157,4 @@ TEST_F(mtpdst, one_interior) { // NOLINT } } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_one_interior_two_border_test.cpp b/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_one_interior_two_border_test.cpp index 3be883d..f92af0e 100644 --- a/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_one_interior_two_border_test.cpp +++ b/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_one_interior_two_border_test.cpp @@ -272,4 +272,4 @@ TEST_F(mtpdst, one_interior_shuffle) { // NOLINT destroy(); } } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_two_border_test.cpp b/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_two_border_test.cpp index 8bb6140..79a2c8f 100644 --- a/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_two_border_test.cpp +++ b/test/multi_thread/put_delete_scan/multi_thread_put_delete_scan_two_border_test.cpp @@ -265,4 +265,4 @@ TEST_F(mtpdst, two_border_shuffle) { // NOLINT } } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/put/put_test.cpp b/test/put/put_test.cpp index 792e0c8..f4c38d1 100644 --- a/test/put/put_test.cpp +++ b/test/put/put_test.cpp @@ -153,4 +153,4 @@ TEST_F(put_test, one_key_twice_unique_rest_false) { // NOLINT ASSERT_EQ(leave(token), status::OK); } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/scan/scan_detect_phantom_test.cpp b/test/scan/scan_detect_phantom_test.cpp index 7f024f1..370e2f7 100644 --- a/test/scan/scan_detect_phantom_test.cpp +++ b/test/scan/scan_detect_phantom_test.cpp @@ -92,4 +92,4 @@ TEST_F(scan_detect_phantom_test, // NOLINT ASSERT_EQ(status::OK, leave(s)); } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/scan/scan_long_key_test.cpp b/test/scan/scan_long_key_test.cpp index 7ebbc85..484a272 100644 --- a/test/scan/scan_long_key_test.cpp +++ b/test/scan/scan_long_key_test.cpp @@ -64,4 +64,4 @@ TEST_F(scan_long_key_test, put_scan_delete) { // NOLINT ASSERT_EQ(status::OK, leave(s)); } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/scan/scan_test.cpp b/test/scan/scan_test.cpp index 77f051e..219d698 100644 --- a/test/scan/scan_test.cpp +++ b/test/scan/scan_test.cpp @@ -72,7 +72,7 @@ TEST_F(st, scan_multiple_same_null_char_key_2) { // NOLINT TEST_F(st, scan_against_1_interior_some_border) { // NOLINT /** - * scan against the structure which it has interior node as root, and the + * scan against the structure which it has interior node as root, and the * interior has some border nodes as children. */ Token token{}; @@ -108,16 +108,16 @@ TEST_F(st, scan_against_1_interior_some_border) { // NOLINT TEST_F(st, scan_against_1_interior_2_interior_some_border) { // NOLINT /** - * scan against the structure which it has interior node as root, root has - * two interior nodes as children, and each of children has some border + * scan against the structure which it has interior node as root, root has + * two interior nodes as children, and each of children has some border * nodes as children. */ Token token{}; ASSERT_EQ(enter(token), status::OK); /** - * first border split occurs at inserting_deleting (key_slice_length + 1) - * times. after first border split, split occurs at inserting_deleting - * (key_slice_length / 2 + 1) times. first interior split occurs at + * first border split occurs at inserting_deleting (key_slice_length + 1) + * times. after first border split, split occurs at inserting_deleting + * (key_slice_length / 2 + 1) times. first interior split occurs at * splitting interior_node::child_length times. */ constexpr std::size_t ary_size = diff --git a/test/tsurugi_issue/tsurugi_issue251_test.cpp b/test/tsurugi_issue/tsurugi_issue251_test.cpp index 3ffc5c4..070f889 100644 --- a/test/tsurugi_issue/tsurugi_issue251_test.cpp +++ b/test/tsurugi_issue/tsurugi_issue251_test.cpp @@ -81,4 +81,4 @@ TEST_F(tsurugi_issue251_test, 20230426_comment_ban) { // NOLINT scan_th.join(); } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing diff --git a/test/tsurugi_issue/tsurugi_issue672_test.cpp b/test/tsurugi_issue/tsurugi_issue672_test.cpp index 2c713fc..b4c6fd0 100644 --- a/test/tsurugi_issue/tsurugi_issue672_test.cpp +++ b/test/tsurugi_issue/tsurugi_issue672_test.cpp @@ -75,4 +75,4 @@ TEST_F(tsurugi_issue672_test, simple) { // NOLINT ASSERT_OK(leave(t)); } -} // namespace yakushima::testing \ No newline at end of file +} // namespace yakushima::testing