Skip to content

Commit

Permalink
fix: add new comment
Browse files Browse the repository at this point in the history
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
  • Loading branch information
hlts2 committed Oct 10, 2023
1 parent ee9ce88 commit f9cd0ad
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pkg/gateway/mirror/handler/grpc/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,9 @@ func (s *server) Insert(ctx context.Context, req *payload.Insert_Request) (loc *
return loc, nil
}

// If this condition is matched, it means the request from user.
// So this component sends requests to other Mirror gateways and the Vald gateway (LB gateway) of its own cluster.

var mu sync.Mutex
var result sync.Map[string, *errorState] // map[target host: error state]
loc = &payload.Object_Location{
Expand Down Expand Up @@ -1471,6 +1474,9 @@ func (s *server) Update(ctx context.Context, req *payload.Update_Request) (loc *
return loc, nil
}

// If this condition is matched, it means the request from user.
// So this component sends requests to other Mirror gateways and the Vald gateway (LB gateway) of its own cluster.

var mu sync.Mutex
var result sync.Map[string, *errorState] // map[target host: error state]
loc = &payload.Object_Location{
Expand Down Expand Up @@ -1997,6 +2003,9 @@ func (s *server) Upsert(ctx context.Context, req *payload.Upsert_Request) (loc *
return loc, nil
}

// If this condition is matched, it means the request from user.
// So this component sends requests to other Mirror gateways and the Vald gateway (LB gateway) of its own cluster.

var mu sync.Mutex
var result sync.Map[string, *errorState] // map[target host: error state]
loc = &payload.Object_Location{
Expand Down Expand Up @@ -2354,6 +2363,9 @@ func (s *server) Remove(ctx context.Context, req *payload.Remove_Request) (loc *
return loc, nil
}

// If this condition is matched, it means the request from user.
// So this component sends requests to other Mirror gateways and the Vald gateway (LB gateway) of its own cluster.

var mu sync.Mutex
var result sync.Map[string, *errorState] // map[target host: error state]
loc = &payload.Object_Location{
Expand Down Expand Up @@ -2707,6 +2719,9 @@ func (s *server) RemoveByTimestamp(ctx context.Context, req *payload.Remove_Time
return locs, nil
}

// If this condition is matched, it means the request from user.
// So this component sends requests to other Mirror gateways and the Vald gateway (LB gateway) of its own cluster.

var mu sync.Mutex
var result sync.Map[string, *errorState] // map[target host: error state]
locs = new(payload.Object_Locations)
Expand Down

0 comments on commit f9cd0ad

Please sign in to comment.