mirror of
https://github.com/versity/versitygw.git
synced 2026-09-22 07:54:14 +00:00
Merge pull request #2360 from potatogim/rdma-shutdown-entry
This commit is contained in:
+9
-9
@@ -965,6 +965,15 @@ func debugLogLevel() debuglogger.Level {
|
||||
}
|
||||
|
||||
func runGateway(ctx context.Context, be backend.Backend) error {
|
||||
// The gateway command owns the input backend from here on:
|
||||
// every failure path below must close the whole chain it
|
||||
// has built so far, exactly once. The closure reads be at
|
||||
// run time, so the rollback covers the v1 chain and the RC
|
||||
// wrapper once those layers are added; the once guard keeps
|
||||
// the shared close with the RunVersityGW lifecycle single.
|
||||
be = rdmamode.WrapShutdownOnce(be)
|
||||
defer func() { be.Shutdown() }()
|
||||
|
||||
if pprof != "" {
|
||||
// Listen on the specified address for pprof debug endpoints.
|
||||
// Point a browser to http://<host:port>/debug/pprof/
|
||||
@@ -998,15 +1007,6 @@ func runGateway(ctx context.Context, be backend.Backend) error {
|
||||
}
|
||||
}
|
||||
|
||||
// The gateway command owns the input backend from here on:
|
||||
// every later failure path must close the whole chain it has
|
||||
// built so far, exactly once. The closure reads be at run
|
||||
// time, so the rollback covers the v1 chain and the RC
|
||||
// wrapper once those layers are added; the once guard keeps
|
||||
// the shared close with the RunVersityGW lifecycle single.
|
||||
be = rdmamode.WrapShutdownOnce(be)
|
||||
defer func() { be.Shutdown() }()
|
||||
|
||||
var s3Opts []s3api.Option
|
||||
if v1On {
|
||||
rdma.ConfigureTelemetry(debug)
|
||||
|
||||
Reference in New Issue
Block a user