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

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
     new 34ba9f59d2 [fix](meta) fix bug that backend tag may change to default 
after upgrading to 1.2 (#15085)
34ba9f59d2 is described below

commit 34ba9f59d2abdf2c8ec208f795fb11251170819a
Author: Mingyu Chen <morning...@163.com>
AuthorDate: Thu Dec 15 12:07:11 2022 +0800

    [fix](meta) fix bug that backend tag may change to default after upgrading 
to 1.2 (#15085)
---
 fe/fe-core/src/main/java/org/apache/doris/system/Backend.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/system/Backend.java 
b/fe/fe-core/src/main/java/org/apache/doris/system/Backend.java
index b102f3ed88..7868b50dab 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/system/Backend.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/system/Backend.java
@@ -587,13 +587,12 @@ public class Backend implements Writable {
             // When first upgrade from old version, tags may be null
             tagMap = Maps.newHashMap();
         }
-        if (!tagMap.containsKey(Tag.TYPE_LOCATION)) {
+        if (!locationTag.value.equals(tagMap.get(Tag.TYPE_LOCATION))) {
             // ATTN: here we use Tag.TYPE_LOCATION directly, not 
locationTag.type,
             // because we need to make sure the previous tag must be a 
location type tag,
             // and if not, convert it to location type.
             tagMap.put(Tag.TYPE_LOCATION, locationTag.value);
         }
-        locationTag = Tag.createNotCheck(Tag.TYPE_LOCATION, 
tagMap.get(Tag.TYPE_LOCATION));
     }
 
     public static Backend read(DataInput in) throws IOException {


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

Reply via email to