From be30d79005f53a8fdc719ac382a6742356c8a541 Mon Sep 17 00:00:00 2001 From: lhy1024 Date: Tue, 4 Jul 2023 19:50:31 +0800 Subject: [PATCH] fix lint Signed-off-by: lhy1024 --- pkg/keyspace/tso_keyspace_group.go | 1 + server/apiv2/handlers/tso_keyspace_group.go | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/keyspace/tso_keyspace_group.go b/pkg/keyspace/tso_keyspace_group.go index 457c11edcfb..54887c762cb 100644 --- a/pkg/keyspace/tso_keyspace_group.go +++ b/pkg/keyspace/tso_keyspace_group.go @@ -1013,6 +1013,7 @@ func (m *GroupManager) FinishMergeKeyspaceByID(mergeTargetID uint32) error { return nil } +// GetKeyspaceGroupPrimaryByID returns the primary node of the keyspace group by ID. func (m *GroupManager) GetKeyspaceGroupPrimaryByID(id uint32) (string, error) { // default keyspace group: "/ms/{cluster_id}/tso/00000/primary". // non-default keyspace group: "/ms/{cluster_id}/tso/keyspace_groups/election/{group}/primary". diff --git a/server/apiv2/handlers/tso_keyspace_group.go b/server/apiv2/handlers/tso_keyspace_group.go index a5265ca7e02..23a5528d2ce 100644 --- a/server/apiv2/handlers/tso_keyspace_group.go +++ b/server/apiv2/handlers/tso_keyspace_group.go @@ -486,6 +486,7 @@ func SetPriorityForKeyspaceGroup(c *gin.Context) { c.JSON(http.StatusOK, nil) } +// GetKeyspaceGroupPrimaryByID gets primary of keyspace group by ID. func GetKeyspaceGroupPrimaryByID(c *gin.Context) { id, err := validateKeyspaceGroupID(c) if err != nil {