diff --git a/include/cc/cc_request.h b/include/cc/cc_request.h index 07bab182..f9878330 100644 --- a/include/cc/cc_request.h +++ b/include/cc/cc_request.h @@ -5130,6 +5130,23 @@ struct KickoutCcEntryCc : public TemplatedCcRequest if (!resume_from_upsert_kv) { + const CatalogEntry *catalog_entry = + ccs.GetCatalog(*table_name_, node_group_id_); + if (catalog_entry == nullptr) + { + // Fetch catalog + ccs.FetchCatalog( + *table_name_, node_group_id_, ng_term, this); + return false; + } + if (catalog_entry->schema_version_ >= clean_ts_) + { + // This is an out-dated request. The table has already been + // cleaned and updated. + return SetFinish(); + } + assert(catalog_entry->dirty_schema_version_ == clean_ts_); + if (!CleanCcMap(ccs)) { // Current ccmap has more page @@ -5138,8 +5155,6 @@ struct KickoutCcEntryCc : public TemplatedCcRequest return false; } - const CatalogEntry *catalog_entry = - ccs.GetCatalog(*table_name_, node_group_id_); if (catalog_entry != nullptr && catalog_entry->dirty_schema_ != nullptr) { @@ -5162,7 +5177,8 @@ struct KickoutCcEntryCc : public TemplatedCcRequest return false; } - if (catalog_entry->schema_ != nullptr) + if (catalog_entry->schema_ != nullptr && + catalog_entry->dirty_schema_ != nullptr) { assert(ccs.core_id_ == 0); // Enter ddl phase, update the value of