diff --git a/internal/backend/http_transport.go b/internal/backend/http_transport.go index 09eb3cf16..97fd521e3 100644 --- a/internal/backend/http_transport.go +++ b/internal/backend/http_transport.go @@ -89,7 +89,7 @@ func Transport(opts TransportOptions) (http.RoundTripper, error) { if err != nil { panic(err) } - if feature.Flag.Enabled(feature.HTTPTimeouts) { + if feature.Flag.Enabled(feature.BackendErrorRedesign) { h2.WriteByteTimeout = 120 * time.Second h2.ReadIdleTimeout = 60 * time.Second h2.PingTimeout = 60 * time.Second @@ -132,7 +132,7 @@ func Transport(opts TransportOptions) (http.RoundTripper, error) { } rt := http.RoundTripper(tr) - if feature.Flag.Enabled(feature.HTTPTimeouts) { + if feature.Flag.Enabled(feature.BackendErrorRedesign) { rt = newWatchdogRoundtripper(rt, 120*time.Second, 128*1024) } diff --git a/internal/feature/registry.go b/internal/feature/registry.go index b0e4d2ed7..ac4105140 100644 --- a/internal/feature/registry.go +++ b/internal/feature/registry.go @@ -5,17 +5,17 @@ var Flag = New() // flag names are written in kebab-case const ( + BackendErrorRedesign FlagName = "backend-error-redesign" DeprecateLegacyIndex FlagName = "deprecate-legacy-index" DeprecateS3LegacyLayout FlagName = "deprecate-s3-legacy-layout" DeviceIDForHardlinks FlagName = "device-id-for-hardlinks" - HTTPTimeouts FlagName = "http-timeouts" ) func init() { Flag.SetFlags(map[FlagName]FlagDesc{ + BackendErrorRedesign: {Type: Beta, Description: "enforce timeouts for stuck HTTP requests and use new backend error handling design."}, DeprecateLegacyIndex: {Type: Beta, Description: "disable support for index format used by restic 0.1.0. Use `restic repair index` to update the index if necessary."}, DeprecateS3LegacyLayout: {Type: Beta, Description: "disable support for S3 legacy layout used up to restic 0.7.0. Use `RESTIC_FEATURES=deprecate-s3-legacy-layout=false restic migrate s3_layout` to migrate your S3 repository if necessary."}, DeviceIDForHardlinks: {Type: Alpha, Description: "store deviceID only for hardlinks to reduce metadata changes for example when using btrfs subvolumes. Will be removed in a future restic version after repository format 3 is available"}, - HTTPTimeouts: {Type: Beta, Description: "enforce timeouts for stuck HTTP requests."}, }) }