morningman commented on a change in pull request #8246: URL: https://github.com/apache/incubator-doris/pull/8246#discussion_r815292493
########## File path: fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadJob.java ########## @@ -1030,10 +1029,6 @@ public void write(DataOutput out) throws IOException { } public void readFields(DataInput in) throws IOException { - if (Catalog.getCurrentCatalogJournalVersion() < FeMetaVersion.VERSION_94) { - readFieldOld(in); Review comment: remove `readFieldOld` method ########## File path: fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserProperty.java ########## @@ -523,86 +520,31 @@ public void write(DataOutput out) throws IOException { } public void readFields(DataInput in) throws IOException { - if (Catalog.getCurrentCatalogJournalVersion() < FeMetaVersion.VERSION_43) { - // consume the flag of empty user name - in.readBoolean(); - } - - // user name - if (Catalog.getCurrentCatalogJournalVersion() < FeMetaVersion.VERSION_30) { - qualifiedUser = ClusterNamespace.getFullName(SystemInfoService.DEFAULT_CLUSTER, Text.readString(in)); - } else { - qualifiedUser = Text.readString(in); - } - - if (Catalog.getCurrentCatalogJournalVersion() < FeMetaVersion.VERSION_43) { - int passwordLen = in.readInt(); - byte[] password = new byte[passwordLen]; - in.readFully(password); - - // boolean isAdmin - in.readBoolean(); - - if (Catalog.getCurrentCatalogJournalVersion() >= FeMetaVersion.VERSION_1) { - // boolean isSuperuser - in.readBoolean(); - } - } + qualifiedUser = Text.readString(in); if (Catalog.getCurrentCatalogJournalVersion() < FeMetaVersion.VERSION_100) { Review comment: MINIMUM_VERSION_REQUIRED is 100, so I think we can remove this. ########## File path: fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java ########## @@ -975,35 +973,19 @@ private void readFromStream(DataInput in) throws IOException { txIsolation = Text.readString(in); autoCommit = in.readBoolean(); resourceGroup = Text.readString(in); - if (Catalog.getCurrentCatalogJournalVersion() >= FeMetaVersion.VERSION_65) { - sqlMode = in.readLong(); - } else { - // read old version SQL mode - Text.readString(in); - sqlMode = 0L; - } + sqlMode = in.readLong(); enableProfile = in.readBoolean(); queryTimeoutS = in.readInt(); maxExecMemByte = in.readLong(); - if (Catalog.getCurrentCatalogJournalVersion() >= FeMetaVersion.VERSION_37) { - collationServer = Text.readString(in); - } - if (Catalog.getCurrentCatalogJournalVersion() >= FeMetaVersion.VERSION_38) { - batchSize = in.readInt(); - disableStreamPreaggregations = in.readBoolean(); - parallelExecInstanceNum = in.readInt(); - } - if (Catalog.getCurrentCatalogJournalVersion() >= FeMetaVersion.VERSION_62) { - exchangeInstanceParallel = in.readInt(); - } + collationServer = Text.readString(in); + batchSize = in.readInt(); + disableStreamPreaggregations = in.readBoolean(); + parallelExecInstanceNum = in.readInt(); + exchangeInstanceParallel = in.readInt(); } public void readFields(DataInput in) throws IOException { - if (Catalog.getCurrentCatalogJournalVersion() < FeMetaVersion.VERSION_67) { - readFromStream(in); Review comment: remove `readFromStream()` method -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org