[fix](statistics)Fix set partition loaded replayer try to write edit log bug (#29395)

While observer or checkpointer replay SetPartitionLoaded log, it shouldn't try to write the log. This pr is to fix the bug.
This commit is contained in:
Jibing-Li
2024-01-02 19:38:34 +08:00
committed by GitHub
parent 04abcc1245
commit 3eca457edd

View File

@ -936,7 +936,7 @@ public class AnalysisManager implements Writable {
// Set to true means new partition loaded data
public void setNewPartitionLoaded(long tblId) {
TableStatsMeta statsStatus = idToTblStats.get(tblId);
if (statsStatus != null) {
if (statsStatus != null && Env.getCurrentEnv().isMaster() && !Env.isCheckpointThread()) {
statsStatus.newPartitionLoaded.set(true);
logCreateTableStats(statsStatus);
}