Skip to content

Commit

Permalink
NOLINT
Browse files Browse the repository at this point in the history
  • Loading branch information
ban-nobuhiro committed Jan 16, 2025
1 parent 41fece7 commit cec32dd
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions src/concurrency_control/garbage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ version* find_latest_invisible_version_from_batch(
void delete_version_list(version* ver) {
while (ver != nullptr) {
version* v_next = ver->get_next();
delete ver; // LINT
delete ver; // NOLINT
++get_gc_ct_ver();
ver = v_next;
}
Expand Down Expand Up @@ -274,7 +274,7 @@ inline void unhooking_keys_and_pruning_versions_at_the_storage(
Storage st, std::size_t& record_num,
std::size_t& average_version_list_size, std::size_t& average_key_size,
std::size_t& average_value_size) {
std::string_view st_view = {reinterpret_cast<char*>(&st), // LINT
std::string_view st_view = {reinterpret_cast<char*>(&st), // NOLINT
sizeof(st)};
// init about stats
record_num = 0;
Expand Down Expand Up @@ -308,7 +308,7 @@ inline void unhooking_keys_and_pruning_versions_at_the_storage(
};

for (auto&& sr : scan_res) {
Record* rec_ptr = reinterpret_cast<Record*>(std::get<1>(sr)); // LINT
Record* rec_ptr = reinterpret_cast<Record*>(std::get<1>(sr)); // NOLINT

// gathering stats info
average_key_size += rec_ptr->get_key_view().size();
Expand Down Expand Up @@ -352,7 +352,7 @@ inline void unhooking_keys_and_pruning_versions(stats_info_type& stats_info) {

void force_release_key_memory() {
auto& cont = garbage::get_container_rec();
for (auto& elem : cont) { delete elem.first; } // LINT
for (auto& elem : cont) { delete elem.first; } // NOLINT
cont.clear();
}

Expand All @@ -367,15 +367,15 @@ void release_key_memory() {
* have finished.
*/
if ((*itr).second < me) {
delete (*itr).first; // LINT
delete (*itr).first; // NOLINT
++erase_count;
++itr;
} else {
break;
}
}
if (erase_count > 0) {
cont.erase(cont.begin(), cont.begin() + erase_count); // LINT
cont.erase(cont.begin(), cont.begin() + erase_count); // NOLINT
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/concurrency_control/interface/helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace shirakami {

Status check_constraint_key_length(std::string_view const key) {
// check constraint: key
if (key.size() > 30 * 1024) { // LINT
if (key.size() > 30 * 1024) { // NOLINT
// we can't control over 30KB key.
return Status::WARN_INVALID_KEY_LENGTH;
}
Expand Down Expand Up @@ -106,7 +106,7 @@ Status check_before_write_ops(session* const ti, Storage const st,
}

Status read_record(Record* const rec_ptr, tid_word& tid, std::string& val,
bool const read_value = true) { // LINT
bool const read_value = true) { // NOLINT
tid_word f_check{};
tid_word s_check{};

Expand Down
4 changes: 2 additions & 2 deletions src/concurrency_control/interface/long_tx/termination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ extern Status commit(session* const ti) {
long_tx::abort(ti);
ti->call_commit_callback(rc, ti->get_result_info().get_reason_code(),
0);
goto END_COMMIT; // LINT
goto END_COMMIT; // NOLINT
}
if (rc != Status::OK) {
LOG_FIRST_N(ERROR, 1)
Expand Down Expand Up @@ -897,7 +897,7 @@ extern Status commit(session* const ti) {
return rc;
}

Status check_commit(Token const token) { // LINT
Status check_commit(Token const token) { // NOLINT
auto* ti = static_cast<session*>(token);

// check for requested commit.
Expand Down
6 changes: 3 additions & 3 deletions src/concurrency_control/interface/start_up.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Status init_body(database_options options) { // LINT
// order to recover, but log_dir is nothing
enable_true_log_nothing = true;
}
int tid = syscall(SYS_gettid); // LINT
int tid = syscall(SYS_gettid); // NOLINT
std::uint64_t tsc = rdtsc();
log_dir = "/tmp/shirakami-" + std::to_string(tid) + "-" +
std::to_string(tsc);
Expand All @@ -91,7 +91,7 @@ Status init_body(database_options options) { // LINT
lpwal::set_log_dir_pointed(true);
// check exist
boost::filesystem::path ldp{
std::string(options.get_log_directory_path())}; // LINT
std::string(options.get_log_directory_path())}; // NOLINT
boost::system::error_code error;
const bool result = boost::filesystem::exists(ldp, error);
if (!result || error) {
Expand Down Expand Up @@ -231,7 +231,7 @@ Status init_body(database_options options) { // LINT
return Status::OK;
}

Status init(database_options options) { // LINT
Status init(database_options options) { // NOLINT
shirakami_log_entry << "init, options: " << options;
auto ret = init_body(options);
shirakami_log_exit << "init, Status: " << ret;
Expand Down
4 changes: 2 additions & 2 deletions src/concurrency_control/interface/tx_begin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

namespace shirakami {

Status tx_begin_body(transaction_options options) { // LINT
Status tx_begin_body(transaction_options options) { // NOLINT
// get tx options
Token token = options.get_token();

Expand Down Expand Up @@ -108,7 +108,7 @@ Status tx_begin_body(transaction_options options) { // LINT
return Status::OK;
}

Status tx_begin(transaction_options options) { // LINT
Status tx_begin(transaction_options options) { // NOLINT
shirakami_log_entry << "tx_begin, options: " << options;
Token token = options.get_token();
auto* ti = static_cast<session*>(token);
Expand Down

0 comments on commit cec32dd

Please sign in to comment.