This is an automated email from the ASF dual-hosted git repository.
kangkaisen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 561765f Identify old empty tablet when add tablet to meta in
ReportHandler (#3547)
561765f is described below
commit 561765fc08e924ae1609768f4bee3ada43836095
Author: Lijia Liu <[email protected]>
AuthorDate: Mon May 11 09:50:43 2020 +0800
Identify old empty tablet when add tablet to meta in ReportHandler (#3547)
---
.../main/java/org/apache/doris/master/ReportHandler.java | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/fe/src/main/java/org/apache/doris/master/ReportHandler.java
b/fe/src/main/java/org/apache/doris/master/ReportHandler.java
index 7f2cc16..8dbe044 100644
--- a/fe/src/main/java/org/apache/doris/master/ReportHandler.java
+++ b/fe/src/main/java/org/apache/doris/master/ReportHandler.java
@@ -1002,7 +1002,19 @@ public class ReportHandler extends Daemon {
if (status.first == TabletStatus.VERSION_INCOMPLETE ||
status.first == TabletStatus.REPLICA_MISSING) {
long lastFailedVersion = -1L;
long lastFailedVersionHash = 0L;
- if (version > partition.getNextVersion() - 1) {
+
+ boolean initPartitionCreateByOldVersionDoris =
+ partition.getVisibleVersion() ==
Partition.PARTITION_INIT_VERSION &&
+ partition.getVisibleVersionHash() ==
Partition.PARTITION_INIT_VERSION_HASH &&
+ version == 2 &&
+ versionHash == 0;
+
+ if (initPartitionCreateByOldVersionDoris) {
+ // For some partition created by old version's Doris
+ // The init partition's version in FE is (1-0), the
tablet's version in BE is (2-0)
+ // If the BE report version is (2-0) and partition's
version is (1-0),
+ // we should add the tablet to meta.
+ } else if (version > partition.getNextVersion() - 1) {
// this is a fatal error
throw new MetaNotFoundException("version is invalid.
tablet[" + version + "-" + versionHash + "]"
+ ", partition's max version [" +
(partition.getNextVersion() - 1) + "]");
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]