You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/07/16 15:14:18 UTC

[GitHub] [doris] morningman commented on a diff in pull request #10901: [feature](resource-tag) support multi tag for a single Backend

morningman commented on code in PR #10901:
URL: https://github.com/apache/doris/pull/10901#discussion_r922690427


##########
fe/fe-core/src/main/java/org/apache/doris/system/Backend.java:
##########
@@ -116,8 +119,14 @@ public enum BackendState {
     // additional backendStatus information for BE, display in JSON format
     @SerializedName("backendStatus")
     private BackendStatus backendStatus = new BackendStatus();
-    @SerializedName("tag")
-    private Tag tag = Tag.DEFAULT_BACKEND_TAG;
+    // the locationTag is also saved in tagMap, use a single field here to avoid
+    // creating this everytime we get it.
+    @SerializedName(value = "locationTag", alternate = {"tag"})
+    private Tag locationTag = Tag.DEFAULT_BACKEND_TAG;

Review Comment:
   It is ok to leave this field here. Because the locationTag is used very frequent.
   We don't need to create it every time we get it.
   And in future, I will remove `@ SerializedName` annotation of it because it has been saved in `tagMap`



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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