Skip to content

Commit a38d75c

Browse files
authored
*: Downgrade unnecessary log(release-8.5) (#10465)
close #10467 Signed-off-by: JaySon-Huang <tshent@qq.com>
1 parent b73e7a2 commit a38d75c

5 files changed

Lines changed: 15 additions & 15 deletions

File tree

dbms/src/Flash/Statistics/TableScanImpl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ void TableScanStatistics::collectExtraRuntimeDetail()
108108
|| remote_table_scan_detail.max_stream_cost_ns < this_execution_time)
109109
remote_table_scan_detail.max_stream_cost_ns = this_execution_time;
110110
if (remote_table_scan_detail.min_stream_cost_ns < 0.0 // not inited
111-
|| remote_table_scan_detail.max_stream_cost_ns > this_execution_time)
111+
|| remote_table_scan_detail.min_stream_cost_ns > this_execution_time)
112112
remote_table_scan_detail.min_stream_cost_ns = this_execution_time;
113113
}
114114
});

dbms/src/TiDB/Schema/SchemaBuilder.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ void SchemaBuilder<Getter, NameMapper>::applySetTiFlashReplica(DatabaseID databa
394394
auto storage = tmt_context.getStorages().get(keyspace_id, table_info->id);
395395
if (unlikely(storage == nullptr))
396396
{
397-
LOG_ERROR(
397+
LOG_WARNING(
398398
log,
399399
"Storage instance is not exist in TiFlash, applySetTiFlashReplica is ignored, table_id={}",
400400
table_id);
@@ -523,12 +523,12 @@ void SchemaBuilder<Getter, NameMapper>::applyPartitionDiff(DatabaseID database_i
523523
auto table_info = getter.getTableInfo(database_id, table_id);
524524
if (unlikely(table_info == nullptr))
525525
{
526-
LOG_ERROR(log, "table is not exist in TiKV, applyPartitionDiff is ignored, table_id={}", table_id);
526+
LOG_WARNING(log, "table is not exist in TiKV, applyPartitionDiff is ignored, table_id={}", table_id);
527527
return;
528528
}
529529
if (!table_info->isLogicalPartitionTable())
530530
{
531-
LOG_ERROR(
531+
LOG_WARNING(
532532
log,
533533
"new table in TiKV is not a partition table {}, database_id={} table_id={}",
534534
name_mapper.debugCanonicalName(*table_info, database_id, keyspace_id),
@@ -541,7 +541,7 @@ void SchemaBuilder<Getter, NameMapper>::applyPartitionDiff(DatabaseID database_i
541541
auto storage = tmt_context.getStorages().get(keyspace_id, table_info->id);
542542
if (storage == nullptr)
543543
{
544-
LOG_ERROR(
544+
LOG_WARNING(
545545
log,
546546
"logical_table storage instance is not exist in TiFlash, applyPartitionDiff is ignored, table_id={}",
547547
table_id);
@@ -664,7 +664,7 @@ void SchemaBuilder<Getter, NameMapper>::applyRenameTable(DatabaseID database_id,
664664
auto new_table_info = getter.getTableInfo(database_id, table_id);
665665
if (unlikely(new_table_info == nullptr))
666666
{
667-
LOG_ERROR(log, "table is not exist in TiKV, applyRenameTable is ignored, table_id={}", table_id);
667+
LOG_WARNING(log, "table is not exist in TiKV, applyRenameTable is ignored, table_id={}", table_id);
668668
return;
669669
}
670670

@@ -970,7 +970,7 @@ void SchemaBuilder<Getter, NameMapper>::applyRecoverDatabase(DatabaseID database
970970
auto db = context.tryGetDatabase(db_name);
971971
if (unlikely(!db))
972972
{
973-
LOG_ERROR(
973+
LOG_WARNING(
974974
log,
975975
"Recover database is ignored because instance is not exists, may have been physically dropped, "
976976
"database_id={}",

dbms/src/TiDB/Schema/SchemaGetter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ std::pair<TiDB::TableInfoPtr, bool> SchemaGetter::getTableInfoImpl(DatabaseID db
302302
get_by_mvcc = true;
303303
if (table_info_json.empty())
304304
{
305-
LOG_ERROR(
305+
LOG_WARNING(
306306
log,
307307
"The table is dropped in TiKV, and the latest table_info is still empty, it should be GCed, "
308308
"table_id={}",
@@ -339,7 +339,7 @@ std::vector<TiDB::TableInfoPtr> SchemaGetter::listTables(DatabaseID db_id)
339339
auto db_key = getDBKey(db_id);
340340
if (!checkDBExists(db_key))
341341
{
342-
LOG_ERROR(log, "The database does not exist, database_id={}", db_id);
342+
LOG_WARNING(log, "The database does not exist, database_id={}", db_id);
343343
return {};
344344
}
345345

dbms/src/TiDB/Schema/SchemaSyncService.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ bool SchemaSyncService::gcImpl(Timestamp gc_safepoint, KeyspaceID keyspace_id, b
323323
storage->getTombstone(),
324324
gc_safepoint,
325325
canonical_name);
326-
succeeded = false; // dropping this table is skipped, do not succee the `last_gc_safepoint`
326+
succeeded = false; // dropping this table is skipped, do not success the `last_gc_safepoint`
327327
continue;
328328
}
329329
else
@@ -350,7 +350,7 @@ bool SchemaSyncService::gcImpl(Timestamp gc_safepoint, KeyspaceID keyspace_id, b
350350
drop_query->database = std::move(database_name);
351351
drop_query->table = std::move(table_name);
352352
drop_query->if_exists = true;
353-
drop_query->lock_timeout = std::chrono::milliseconds(1 * 1000); // timeout for acquring table drop lock
353+
drop_query->lock_timeout = std::chrono::milliseconds(1 * 1000); // timeout for acquiring table drop lock
354354
ASTPtr ast_drop_query = drop_query;
355355
try
356356
{
@@ -363,7 +363,7 @@ bool SchemaSyncService::gcImpl(Timestamp gc_safepoint, KeyspaceID keyspace_id, b
363363
}
364364
catch (DB::Exception & e)
365365
{
366-
succeeded = false; // dropping this table is skipped, do not succee the `last_gc_safepoint`
366+
succeeded = false; // dropping this table is skipped, do not success the `last_gc_safepoint`
367367
String err_msg;
368368
// Maybe a read lock of a table is held for a long time, just ignore it this round.
369369
if (e.code() == ErrorCodes::DEADLOCK_AVOIDED)
@@ -406,7 +406,7 @@ bool SchemaSyncService::gcImpl(Timestamp gc_safepoint, KeyspaceID keyspace_id, b
406406
auto drop_query = std::make_shared<ASTDropQuery>();
407407
drop_query->database = db_name;
408408
drop_query->if_exists = true;
409-
drop_query->lock_timeout = std::chrono::milliseconds(1 * 1000); // timeout for acquring table drop lock
409+
drop_query->lock_timeout = std::chrono::milliseconds(1 * 1000); // timeout for acquiring table drop lock
410410
ASTPtr ast_drop_query = drop_query;
411411
try
412412
{
@@ -417,7 +417,7 @@ bool SchemaSyncService::gcImpl(Timestamp gc_safepoint, KeyspaceID keyspace_id, b
417417
}
418418
catch (DB::Exception & e)
419419
{
420-
succeeded = false; // dropping this database is skipped, do not succee the `last_gc_safepoint`
420+
succeeded = false; // dropping this database is skipped, do not success the `last_gc_safepoint`
421421
String err_msg;
422422
if (e.code() == ErrorCodes::DEADLOCK_AVOIDED)
423423
err_msg = "locking attempt has timed out!"; // ignore verbose stack for this error

0 commit comments

Comments
 (0)