From 43aaf600c687e098b2af28773ba92d2c458b54d4 Mon Sep 17 00:00:00 2001 From: Jon Kartago Lamida Date: Tue, 14 May 2024 14:18:15 +0800 Subject: [PATCH] Revert accidentally unintended commits Signed-off-by: Jon Kartago Lamida --- ring/example/local/local.go | 7 +------ user/id.go | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/ring/example/local/local.go b/ring/example/local/local.go index b44f8f067..4a0089140 100644 --- a/ring/example/local/local.go +++ b/ring/example/local/local.go @@ -12,8 +12,6 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/dskit/dns" "github.com/grafana/dskit/flagext" "github.com/grafana/dskit/kv" @@ -21,6 +19,7 @@ import ( "github.com/grafana/dskit/kv/memberlist" "github.com/grafana/dskit/ring" "github.com/grafana/dskit/services" + "github.com/prometheus/client_golang/prometheus" ) var ( @@ -147,9 +146,6 @@ func runClient() { for _, v := range replicas.Instances { fmt.Println("Addr", v.Addr, "Token count", len(v.Tokens)) } - for _, x := range replicas.GetIDs() { - fmt.Println("ID", x) - } } } @@ -185,7 +181,6 @@ func SimpleMemberlistKV(bindaddr string, bindport int, joinmembers []string) *me config.NodeName = bindaddr config.StreamTimeout = 5 * time.Second - config.MessageHistoryBufferBytes = 1 * 1024 * 1024 return memberlist.NewKVInitService( &config, diff --git a/user/id.go b/user/id.go index db05072de..bafecdce9 100644 --- a/user/id.go +++ b/user/id.go @@ -41,7 +41,7 @@ func InjectOrgID(ctx context.Context, orgID string) context.Context { return context.WithValue(ctx, interface{}(orgIDContextKey), orgID) } -// ExtractUserID gets the user ID from the contextmi. +// ExtractUserID gets the user ID from the context. func ExtractUserID(ctx context.Context) (string, error) { userID, ok := ctx.Value(userIDContextKey).(string) if !ok {