From d796621ccc6b4819ec2f0b667e8ca313e144aaee Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 21 Mar 2022 23:25:24 -0700 Subject: [PATCH] choose smaller default deadline for diagnostics without --full (#14599) --- cmd/admin-handlers.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/admin-handlers.go b/cmd/admin-handlers.go index 676ea80d7..eef8f350f 100644 --- a/cmd/admin-handlers.go +++ b/cmd/admin-handlers.go @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2021 MinIO, Inc. +// Copyright (c) 2015-2022 MinIO, Inc. // // This file is part of MinIO Object Storage stack // @@ -1684,7 +1684,10 @@ func (a adminAPIHandlers) HealthInfoHandler(w http.ResponseWriter, r *http.Reque logger.LogIf(ctx, enc.Encode(healthInfo)) } - deadline := 1 * time.Hour + deadline := 10 * time.Second // Default deadline is 10secs for health diagnostics. + if query.Get("perfnet") != "" || query.Get("perfdrive") != "" { + deadline = 1 * time.Hour + } if dstr := r.Form.Get("deadline"); dstr != "" { var err error deadline, err = time.ParseDuration(dstr)