[fix](meta) fix image file checksum error (#19363)

This commit is contained in:
Mingyu Chen
2023-05-08 10:00:09 +08:00
committed by GitHub
parent 1f6898a091
commit fb5b3029a7
3 changed files with 4 additions and 7 deletions

View File

@ -4638,6 +4638,7 @@ public class Env {
return functionSet.isNullResultWithOneNullParamFunctions(funcName);
}
@Deprecated
public long loadCluster(DataInputStream dis, long checksum) throws IOException, DdlException {
return getInternalCatalog().loadCluster(dis, checksum);
}

View File

@ -2783,6 +2783,7 @@ public class InternalCatalog implements CatalogIf<Database> {
}
}
@Deprecated
public long loadCluster(DataInputStream dis, long checksum) throws IOException, DdlException {
int clusterCount = dis.readInt();
checksum ^= clusterCount;
@ -2792,11 +2793,6 @@ public class InternalCatalog implements CatalogIf<Database> {
Cluster oldCluster = Cluster.read(dis);
checksum ^= oldCluster.getId();
}
InfoSchemaDb db = new InfoSchemaDb(SystemInfoService.DEFAULT_CLUSTER);
db.setClusterName(SystemInfoService.DEFAULT_CLUSTER);
idToDb.put(db.getId(), db);
fullNameToDb.put(db.getFullName(), db);
return checksum;
}

View File

@ -36,13 +36,13 @@ public class PersistMetaModules {
public static final ImmutableList<String> MODULE_NAMES = ImmutableList.of(
"masterInfo", "frontends", "backends", "datasource", "db", "alterJob", "recycleBin",
"globalVariable", "broker", "resources", "exportJob", "syncJob", "backupHandler",
"globalVariable", "cluster", "broker", "resources", "exportJob", "syncJob", "backupHandler",
"paloAuth", "transactionState", "colocateTableIndex", "routineLoadJobs", "loadJobV2", "smallFiles",
"plugins", "deleteHandler", "sqlBlockRule", "policy", "mtmvJobManager", "globalFunction", "resourceGroups");
// Modules in this list is deprecated and will not be saved in meta file. (also should not be in MODULE_NAMES)
public static final ImmutableList<String> DEPRECATED_MODULE_NAMES = ImmutableList.of(
"cluster", "loadJob", "cooldownJob");
"loadJob", "cooldownJob");
static {
MODULES_MAP = Maps.newHashMap();