[chore](femetaversion) add a check in fe code to avoid fe meta version changed during pick PR (#35039)
* [chore](femetaversion) add a check in fe code to avoid fe meta version changed during pick PR * f * f --------- Co-authored-by: yiguolei <yiguolei@gmail.com>
This commit is contained in:
@ -21,6 +21,7 @@ import org.apache.doris.catalog.Env;
|
||||
import org.apache.doris.common.CommandLineOptions;
|
||||
import org.apache.doris.common.Config;
|
||||
import org.apache.doris.common.FeConstants;
|
||||
import org.apache.doris.common.FeMetaVersion;
|
||||
import org.apache.doris.common.LdapConfig;
|
||||
import org.apache.doris.common.Log4jConfig;
|
||||
import org.apache.doris.common.ThreadPoolManager;
|
||||
@ -77,6 +78,16 @@ public class DorisFE {
|
||||
private static FileLock processFileLock;
|
||||
|
||||
public static void main(String[] args) {
|
||||
// Every doris version should have a final meta version, it should not change
|
||||
// between small releases. Add a check here to avoid mistake.
|
||||
if (Version.DORIS_FE_META_VERSION > 0
|
||||
&& FeMetaVersion.VERSION_CURRENT != Version.DORIS_FE_META_VERSION) {
|
||||
System.err.println("This release's fe meta version should be "
|
||||
+ Version.DORIS_FE_META_VERSION
|
||||
+ " but it is " + FeMetaVersion.VERSION_CURRENT
|
||||
+ ". It should not change, or FE could not rollback in this version");
|
||||
return;
|
||||
}
|
||||
StartupOptions options = new StartupOptions();
|
||||
options.enableHttpServer = true;
|
||||
options.enableQeService = true;
|
||||
|
||||
@ -35,6 +35,8 @@ build_version_rc_version="rc09"
|
||||
|
||||
build_version="${build_version_prefix}-${build_version_major}.${build_version_minor}.${build_version_patch}-${build_version_rc_version}"
|
||||
|
||||
# This version is used to check FeMetaVersion is not changed during release
|
||||
build_fe_meta_version=0
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
|
||||
@ -132,6 +134,7 @@ public class Version {
|
||||
public static final String DORIS_BUILD_TIME = "${build_time}";
|
||||
public static final String DORIS_BUILD_INFO = "${build_info}";
|
||||
public static final String DORIS_JAVA_COMPILE_VERSION = "${java_version_str}";
|
||||
public static final int DORIS_FE_META_VERSION = ${build_fe_meta_version};
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("doris_build_version_prefix: " + DORIS_BUILD_VERSION_PREFIX);
|
||||
|
||||
Reference in New Issue
Block a user