Skip to content

Commit

Permalink
update FeMetaVersion.VERSION_130
Browse files Browse the repository at this point in the history
  • Loading branch information
justfortaste committed Nov 18, 2024
1 parent 2258d89 commit bf24504
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,10 @@ public final class FeMetaVersion {

public static final int VERSION_140 = 140;

// For BackupMeta storage policy
public static final int VERSION_141 = 141;
// note: when increment meta version, should assign the latest version to VERSION_CURRENT
public static final int VERSION_CURRENT = VERSION_140;

public static final int VERSION_CURRENT = VERSION_141;

// all logs meta version should >= the minimum version, so that we could remove many if clause, for example
// if (FE_METAVERSION < VERSION_94) ...
Expand Down
11 changes: 7 additions & 4 deletions fe/fe-core/src/main/java/org/apache/doris/backup/BackupMeta.java
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,13 @@ public void readFields(DataInput in) throws IOException {
Resource resource = Resource.read(in);
resourceNameMap.put(resource.getName(), resource);
}
size = in.readInt();
for (int i = 0; i < size; i++) {
StoragePolicy policy = StoragePolicy.read(in);
storagePolicyNameMap.put(policy.getName(), policy);

if (Env.getCurrentEnvJournalVersion() >= FeMetaVersion.VERSION_130) {
size = in.readInt();
for (int i = 0; i < size; i++) {
StoragePolicy policy = StoragePolicy.read(in);
storagePolicyNameMap.put(policy.getName(), policy);
}
}
}

Expand Down

0 comments on commit bf24504

Please sign in to comment.