From 1d2687c1873a93b8abfde372d747ce8dd1d2b1ac Mon Sep 17 00:00:00 2001 From: JaySon-Huang Date: Mon, 8 Apr 2024 17:48:58 +0800 Subject: [PATCH] Skip succee the last_gc_safepoint --- dbms/src/TiDB/Schema/SchemaSyncService.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dbms/src/TiDB/Schema/SchemaSyncService.cpp b/dbms/src/TiDB/Schema/SchemaSyncService.cpp index adc1821c00a..419a2f28e4a 100644 --- a/dbms/src/TiDB/Schema/SchemaSyncService.cpp +++ b/dbms/src/TiDB/Schema/SchemaSyncService.cpp @@ -307,6 +307,7 @@ bool SchemaSyncService::gcImpl(Timestamp gc_safepoint, KeyspaceID keyspace_id, b storage->getTombstone(), gc_safepoint, canonical_name); + succeeded = false; // dropping this table is skipped, do not succee the `last_gc_safepoint` continue; } else @@ -346,7 +347,7 @@ bool SchemaSyncService::gcImpl(Timestamp gc_safepoint, KeyspaceID keyspace_id, b } catch (DB::Exception & e) { - succeeded = false; + succeeded = false; // dropping this table is skipped, do not succee the `last_gc_safepoint` String err_msg; // Maybe a read lock of a table is held for a long time, just ignore it this round. if (e.code() == ErrorCodes::DEADLOCK_AVOIDED) @@ -400,7 +401,7 @@ bool SchemaSyncService::gcImpl(Timestamp gc_safepoint, KeyspaceID keyspace_id, b } catch (DB::Exception & e) { - succeeded = false; + succeeded = false; // dropping this database is skipped, do not succee the `last_gc_safepoint` String err_msg; if (e.code() == ErrorCodes::DEADLOCK_AVOIDED) err_msg = "locking attempt has timed out!"; // ignore verbose stack for this error