Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions fe/src/com/baidu/palo/catalog/Catalog.java
Original file line number Diff line number Diff line change
Expand Up @@ -4946,10 +4946,13 @@ public long loadCluster(DataInputStream dis, long checksum) throws IOException,
checksum ^= cluster.getId();

// BE is in default_cluster when added , therefore it is possible that the BE
// in default_clsuter are not the latest because cluster cant't be updated when
// loadCluster is after loadBackend.
// in default_cluster are not the latest because cluster cant't be updated when
// loadCluster is after loadBackend. Because of forgeting to remove BE's id in
// cluster when drop BE or decommission in latest versions, need to update cluster's
// BE.
List<Long> latestBackendIds = systemInfo.getClusterBackendIds(cluster.getName());
if (cluster.getName().equalsIgnoreCase(SystemInfoService.DEFAULT_CLUSTER)) {
if (cluster.getName().equalsIgnoreCase(SystemInfoService.DEFAULT_CLUSTER)
|| Catalog.getCurrentCatalogJournalVersion() <= FeMetaVersion.VERSION_34) {
cluster.setBackendIdList(latestBackendIds);
} else {
// The cluster has the same number of be as systeminfo recorded
Expand Down
2 changes: 1 addition & 1 deletion fe/src/com/baidu/palo/common/FeConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ public class FeConstants {

// general model
// Current meta data version. Use this version to write journals and image
public static int meta_version = FeMetaVersion.VERSION_34;
public static int meta_version = FeMetaVersion.VERSION_35;
}
5 changes: 5 additions & 0 deletions fe/src/com/baidu/palo/common/FeMetaVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,9 @@ public final class FeMetaVersion {

// persist LoadJob's execMemLimit
public static final int VERSION_34 = 34;

// update the BE in cluster, because of forgeting
// to remove backend in cluster when drop backend or
// decommission in latest versions.
public static final int VERSION_35= 35;
}