From a221b2e37a9105f35bb1382481a192b2fd88a765 Mon Sep 17 00:00:00 2001 From: Renan Rangel Date: Fri, 18 Oct 2024 08:23:58 -0700 Subject: [PATCH] fix goroutine leak Signed-off-by: Renan Rangel --- go/vt/mysqlctl/mysqlshellbackupengine.go | 1 + 1 file changed, 1 insertion(+) diff --git a/go/vt/mysqlctl/mysqlshellbackupengine.go b/go/vt/mysqlctl/mysqlshellbackupengine.go index 65950aced5a..8c347a008f6 100644 --- a/go/vt/mysqlctl/mysqlshellbackupengine.go +++ b/go/vt/mysqlctl/mysqlshellbackupengine.go @@ -190,6 +190,7 @@ func (be *MySQLShellBackupEngine) ExecuteBackup(ctx context.Context, params Back // Get exit status. if err := cmd.Wait(); err != nil { + pipeWriter.Close() // make sure we close the writer so the goroutines above will complete. return BackupUnusable, vterrors.Wrap(err, mysqlShellBackupEngineName+" failed") }