morningman commented on a change in pull request #8099: URL: https://github.com/apache/incubator-doris/pull/8099#discussion_r812541088
########## File path: fe/fe-core/src/main/java/org/apache/doris/backup/BackupJobInfo.java ########## @@ -516,7 +516,6 @@ public static BackupJobInfo fromCatalog(long backupTime, String label, String db BackupPartitionInfo partitionInfo = new BackupPartitionInfo(); partitionInfo.id = partition.getId(); partitionInfo.version = partition.getVisibleVersion(); - partitionInfo.versionHash = partition.getVisibleVersionHash(); Review comment: `versionHash` in `BackupPartitionInfo` can also be moved ########## File path: fe/fe-core/src/main/java/org/apache/doris/common/util/PropertyAnalyzer.java ########## @@ -258,16 +257,15 @@ public static TTabletType analyzeTabletType(Map<String, String> properties) thro return tTabletType; } - public static Pair<Long, Long> analyzeVersionInfo(Map<String, String> properties) throws AnalysisException { - Pair<Long, Long> versionInfo = new Pair<>(Partition.PARTITION_INIT_VERSION, - Partition.PARTITION_INIT_VERSION_HASH); + public static Long analyzeVersionInfo(Map<String, String> properties) throws AnalysisException { + Long versionInfo = Partition.PARTITION_INIT_VERSION; if (properties != null && properties.containsKey(PROPERTIES_VERSION_INFO)) { String versionInfoStr = properties.get(PROPERTIES_VERSION_INFO); String[] versionInfoArr = versionInfoStr.split(COMMA_SEPARATOR); + // Still parse version and version hash, but version hash is useless, just keep compatible Review comment: If think you can accept the case in `else` block ########## File path: fe/fe-core/src/main/java/org/apache/doris/transaction/PartitionCommitInfo.java ########## @@ -44,12 +44,11 @@ public PartitionCommitInfo() { } - public PartitionCommitInfo(long partitionId, long version, long versionHash, long visibleTime) { Review comment: Remove field `versionHash`, it is compatible. ########## File path: fe/fe-core/src/main/java/org/apache/doris/persist/ReplicaPersistInfo.java ########## @@ -93,7 +93,7 @@ public static ReplicaOperationType findByValue(int value) { private long backendId; private long version; - private long versionHash; + private long versionHash = 0L; Review comment: Remove it ########## File path: fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java ########## @@ -943,7 +940,7 @@ protected void unprotectedPreCommitTransaction2PC(TransactionState transactionSt for (long tableId : tableToPartition.keySet()) { TableCommitInfo tableCommitInfo = new TableCommitInfo(tableId); for (long partitionId : tableToPartition.get(tableId)) { - PartitionCommitInfo partitionCommitInfo = new PartitionCommitInfo(partitionId,-1, -1, -1); + PartitionCommitInfo partitionCommitInfo = new PartitionCommitInfo(partitionId,-1, -1); Review comment: ```suggestion PartitionCommitInfo partitionCommitInfo = new PartitionCommitInfo(partitionId, -1, -1); ``` ########## File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Partition.java ########## @@ -49,7 +48,6 @@ private static final Logger LOG = LogManager.getLogger(Partition.class); public static final long PARTITION_INIT_VERSION = 1L; - public static final long PARTITION_INIT_VERSION_HASH = 0L; Review comment: Why not remove field `visibleVersionHash`, `committedVersionHash` and `nextVersionHash` of this class? ########## File path: fe/fe-core/src/main/java/org/apache/doris/clone/TabletSchedCtx.java ########## @@ -189,7 +189,6 @@ public Priority adjust(Priority origPriority, boolean isUp) { private long visibleVersion = -1; private long visibleVersionHash = -1; Review comment: Not removed? ########## File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Replica.java ########## @@ -74,7 +74,7 @@ public boolean canQuery() { @SerializedName(value = "version") private volatile long version; @SerializedName(value = "versionHash") - private long versionHash; Review comment: We can just remove it. ########## File path: fe/fe-core/src/main/java/org/apache/doris/load/Load.java ########## @@ -2920,11 +2913,11 @@ private boolean processQuorumFinished(LoadJob job, Database db) { return true; } - private void updatePartitionVersion(Partition partition, long version, long versionHash, long jobId) { + private void updatePartitionVersion(Partition partition, long version, long jobId) { long partitionId = partition.getId(); - partition.updateVisibleVersionAndVersionHash(version, versionHash); - LOG.info("update partition version success. version: {}, version hash: {}, job id: {}, partition id: {}", - version, versionHash, jobId, partitionId); + partition.updateVisibleVersion(version); + LOG.info("update partition version success. version: {}, job id: {}, partition id: {}", Review comment: ```suggestion LOG.info("update partition version success. version: {}, job id: {}, partition id: {}", ``` ########## File path: fe/fe-core/src/main/java/org/apache/doris/catalog/TabletInvertedIndex.java ########## @@ -361,7 +358,7 @@ private boolean needRecover(Replica replicaInFe, int schemaHashInFe, TTabletInfo return false; } - if (replicaInFe.getVersionHash() == 0 && backendTabletInfo.getVersion() == replicaInFe.getVersion() - 1) { + if (backendTabletInfo.getVersion() == replicaInFe.getVersion() - 1) { Review comment: According to the comment below, I think we need to double check this case. ########## File path: fe/fe-core/src/main/java/org/apache/doris/transaction/PartitionCommitInfo.java ########## @@ -62,8 +61,9 @@ public static PartitionCommitInfo read(DataInput in) throws IOException { if (Catalog.getCurrentCatalogJournalVersion() < FeMetaVersion.VERSION_88) { Review comment: We can just remove this `if` block, or throw an exception. -- 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