You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by ya...@apache.org on 2021/07/30 01:25:30 UTC

[incubator-doris] branch master updated: fix version (#6334)

This is an automated email from the ASF dual-hosted git repository.

yangzhg 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 a2eb1b9  fix version (#6334)
a2eb1b9 is described below

commit a2eb1b9d5bb944a6889d152ec6a19f697c9b9d55
Author: xy720 <22...@users.noreply.github.com>
AuthorDate: Fri Jul 30 09:25:22 2021 +0800

    fix version (#6334)
---
 fe/fe-core/src/main/java/org/apache/doris/common/MetaHeader.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/MetaHeader.java b/fe/fe-core/src/main/java/org/apache/doris/common/MetaHeader.java
index f4b2498..5617a85 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/common/MetaHeader.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/common/MetaHeader.java
@@ -61,9 +61,10 @@ public class MetaHeader {
             }
             MetaJsonHeader metaJsonHeader = MetaJsonHeader.read(raf);
             if (!MetaJsonHeader.IMAGE_VERSION.equalsIgnoreCase(metaJsonHeader.imageVersion)) {
-                LOG.warn("Image file {} format mismatch. Expected version is {}, actual is {}",
-                        imageFile.getPath(), MetaJsonHeader.IMAGE_VERSION, metaJsonHeader.imageVersion);
-                return EMPTY_HEADER;
+                String errMsg = "Image file " + imageFile.getPath() + " format version mismatch. " +
+                        "Expected version is "+ MetaJsonHeader.IMAGE_VERSION +", actual is" + metaJsonHeader.imageVersion;
+                // different versions are incompatible
+                throw new IOException(errMsg);
             }
 
             long length = raf.getFilePointer() - MetaMagicNumber.MAGIC_STR.length() - HEADER_LENGTH_SIZE;

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org