Skip to content

Commit

Permalink
[BugFix] [Cherry-pick] Fix loadAlterJob failed when upgrade from vers…
Browse files Browse the repository at this point in the history
…ion smaller than 3.1.2 (#38173)

Signed-off-by: gengjun-git <[email protected]>
  • Loading branch information
gengjun-git authored and nshangyiming committed Dec 29, 2023
1 parent 79ee91d commit 269e832
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1794,7 +1794,12 @@ public void loadHeaderV2(DataInputStream dis) throws IOException {

public long loadAlterJob(DataInputStream dis, long checksum) throws IOException {
long newChecksum = checksum;
for (AlterJobV2.JobType type : AlterJobV2.JobType.values()) {
// Notice: The order in types must be ROLLUP, SCHEMA_CHANGE, DECOMMISSION_BACKEND,
// if changed, the image read will fail.
List<AlterJobV2.JobType> types = Lists.newArrayList(AlterJobV2.JobType.ROLLUP,
AlterJobV2.JobType.SCHEMA_CHANGE, AlterJobV2.JobType.DECOMMISSION_BACKEND);

for (AlterJobV2.JobType type : types) {
newChecksum = loadAlterJob(dis, newChecksum, type);
}
LOG.info("finished replay alterJob from image");
Expand Down

0 comments on commit 269e832

Please sign in to comment.