fix: remove healthcheck routine for replication targets (#12192)

Bonus also fix a racy lookup on arnsMap() without a
read lock, hold read locks to avoid such race.

moving the healthcheck logic to minio-go
This commit is contained in:
Harshavardhana
2021-04-29 16:41:28 -07:00
committed by GitHub
parent e5ec1325fc
commit c4b21ac7fa
2 changed files with 11 additions and 25 deletions

View File

@@ -1046,7 +1046,7 @@ func proxyHeadToRepTarget(ctx context.Context, bucket, object string, opts Objec
return nil, oi, false, nil
}
tgt = globalBucketTargetSys.GetRemoteTargetClient(ctx, cfg.RoleArn)
if tgt == nil || tgt.isOffline() {
if tgt == nil {
return nil, oi, false, fmt.Errorf("target is offline or not configured")
}
// if proxying explicitly disabled on remote target