[fix](mtmv) fix bug that should not write edit log when replaying alter mv (#19781)

This commit is contained in:
Mingyu Chen
2023-05-18 13:34:05 +08:00
committed by GitHub
parent 943e5fb7e5
commit e45bc160c9
2 changed files with 3 additions and 3 deletions

View File

@ -529,7 +529,7 @@ public class Alter {
olapTable = (MaterializedView) db.getTableOrMetaException(tbl.getTbl(), TableType.MATERIALIZED_VIEW);
// 2. drop old job and kill the associated tasks
Env.getCurrentEnv().getMTMVJobManager().dropJobByName(tbl.getDb(), tbl.getTbl());
Env.getCurrentEnv().getMTMVJobManager().dropJobByName(tbl.getDb(), tbl.getTbl(), isReplay);
// 3. overwrite the refresh info in the memory of fe.
olapTable.writeLock();

View File

@ -367,11 +367,11 @@ public class MTMVJobManager {
LOG.info("change job:{}", changeJob.getJobId());
}
public void dropJobByName(String dbName, String mvName) {
public void dropJobByName(String dbName, String mvName, boolean isReplay) {
for (String jobName : nameToJobMap.keySet()) {
MTMVJob job = nameToJobMap.get(jobName);
if (job.getMVName().equals(mvName) && job.getDBName().equals(dbName)) {
dropJobs(Collections.singletonList(job.getId()), false);
dropJobs(Collections.singletonList(job.getId()), isReplay);
return;
}
}