Skip to content

Commit

Permalink
4
Browse files Browse the repository at this point in the history
  • Loading branch information
Yukang-Lian committed Dec 3, 2024
1 parent 7a33b23 commit f0edf40
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 27 deletions.
2 changes: 0 additions & 2 deletions cloud/src/common/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ CONF_mInt64(recycle_task_threshold_seconds, "10800"); // 3h
// **just for TEST**
CONF_Bool(force_immediate_recycle, "false");

CONF_Bool(enable_meta_checker_verbose_log, "false");

CONF_String(test_s3_ak, "");
CONF_String(test_s3_sk, "");
CONF_String(test_s3_endpoint, "");
Expand Down
41 changes: 16 additions & 25 deletions cloud/src/recycler/meta_checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <chrono>
#include <set>

#include "common/config.h"
#include "common/logging.h"
#include "common/util.h"
#include "meta-service/keys.h"
Expand Down Expand Up @@ -176,12 +175,9 @@ bool MetaChecker::check_fdb_by_fe_meta(MYSQL* conn) {
MYSQL_ROW row = mysql_fetch_row(result);
TabletInfo tablet_info = {0};
tablet_info.tablet_id = atoll(row[0]);
if (config::enable_meta_checker_verbose_log) {
LOG_INFO("get tablet info log")
.tag("db name", elem.first)
.tag("table name", table)
.tag("tablet id", tablet_info.tablet_id);
}
VLOG_DEBUG << "get tablet info log"
<< ", db name" << elem.first << ", table name" << table
<< ",tablet id" << tablet_info.tablet_id;
tablet_info.schema_version = atoll(row[4]);
tablets.push_back(std::move(tablet_info));
}
Expand Down Expand Up @@ -211,13 +207,12 @@ bool MetaChecker::check_fdb_by_fe_meta(MYSQL* conn) {
partition_info.table_id = atoll(row[5]);
partition_info.partition_id = atoll(row[6]);
partition_info.tablet_id = tablet_info.tablet_id;
if (config::enable_meta_checker_verbose_log) {
LOG_INFO("get partition info log")
.tag("db id", partition_info.db_id)
.tag("table id", partition_info.table_id)
.tag("partition id", partition_info.partition_id)
.tag("tablet id", partition_info.tablet_id);
}
VLOG_DEBUG << "get partition info log"
<< ", db id" << partition_info.db_id << ", table id"
<< partition_info.table_id << ", partition id"
<< partition_info.partition_id << ", tablet id"
<< partition_info.tablet_id;

partitions.insert({partition_info.partition_id, std::move(partition_info)});
}
}
Expand All @@ -237,17 +232,13 @@ bool MetaChecker::check_fdb_by_fe_meta(MYSQL* conn) {
int64_t partition_id = atoll(row[0]);
int64_t visible_version = atoll(row[2]);
partitions[partition_id].visible_version = visible_version;
if (config::enable_meta_checker_verbose_log) {
LOG_INFO("get partition version log")
.tag("db name", elem.first)
.tag("table name", table)
.tag("raw partition id", row[0])
.tag("first partition id", partition_id)
.tag("db id", partitions[partition_id].db_id)
.tag("table id", partitions[partition_id].table_id)
.tag("second partition id", partitions[partition_id].partition_id)
.tag("tablet id", partitions[partition_id].tablet_id);
}
VLOG_DEBUG << "get partition version log"
<< ", db name" << elem.first << ", table name" << table
<< ", raw partition id" << row[0] << ", first partition id"
<< partition_id << ", db id" << partitions[partition_id].db_id
<< ", table id" << partitions[partition_id].table_id
<< ", second partition id" << partitions[partition_id].partition_id
<< ", tablet id" << partitions[partition_id].tablet_id;
}
}
mysql_free_result(result);
Expand Down

0 comments on commit f0edf40

Please sign in to comment.