[fix](meta) fix upgrade failed on FE meta from 1.2 (#19674)
Introduced from #19355. We need to keep OP_CREATE_CLUSTER so that Doris can be upgraded from 1.2.x. This OP type should be removed after 3.0
This commit is contained in:
@ -31,6 +31,7 @@ import org.apache.doris.catalog.EncryptKeySearchDesc;
|
||||
import org.apache.doris.catalog.Function;
|
||||
import org.apache.doris.catalog.FunctionSearchDesc;
|
||||
import org.apache.doris.catalog.Resource;
|
||||
import org.apache.doris.cluster.Cluster;
|
||||
import org.apache.doris.common.io.Text;
|
||||
import org.apache.doris.common.io.Writable;
|
||||
import org.apache.doris.common.util.SmallFileMgr.SmallFile;
|
||||
@ -390,6 +391,11 @@ public class JournalEntity implements Writable {
|
||||
isRead = true;
|
||||
break;
|
||||
}
|
||||
case OperationType.OP_CREATE_CLUSTER: {
|
||||
data = Cluster.read(in);
|
||||
isRead = true;
|
||||
break;
|
||||
}
|
||||
case OperationType.OP_ADD_BROKER:
|
||||
case OperationType.OP_DROP_BROKER: {
|
||||
data = new BrokerMgr.ModifyBrokerInfo();
|
||||
|
||||
@ -482,6 +482,10 @@ public class EditLog {
|
||||
MetaContext.get().setMetaVersion(version);
|
||||
break;
|
||||
}
|
||||
case OperationType.OP_CREATE_CLUSTER: {
|
||||
// Do nothing
|
||||
break;
|
||||
}
|
||||
case OperationType.OP_ADD_BROKER: {
|
||||
final BrokerMgr.ModifyBrokerInfo param = (BrokerMgr.ModifyBrokerInfo) journal.getData();
|
||||
env.getBrokerMgr().replayAddBrokers(param.brokerName, param.brokerAddresses);
|
||||
|
||||
@ -131,6 +131,8 @@ public class OperationType {
|
||||
// replaced by OP_GLOBAL_VARIABLE_V2
|
||||
public static final short OP_GLOBAL_VARIABLE = 73;
|
||||
|
||||
@Deprecated
|
||||
// remove be removed in 3.0
|
||||
public static final short OP_CREATE_CLUSTER = 74;
|
||||
public static final short OP_DROP_CLUSTER = 75;
|
||||
public static final short OP_EXPAND_CLUSTER = 76;
|
||||
|
||||
Reference in New Issue
Block a user