Refactor cat-file batch operations and support --batch-command approach (#35775)
Replace #34651 and address more problems including fix framework bugs and changing to QueryInfo and QueryContent calls. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@@ -74,12 +74,6 @@ func (g *Manager) RunWithCancel(rc RunCanceler) {
|
||||
g.RunAtShutdown(context.Background(), rc.Cancel)
|
||||
g.runningServerWaitGroup.Add(1)
|
||||
defer g.runningServerWaitGroup.Done()
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
log.Critical("PANIC during RunWithCancel: %v\nStacktrace: %s", err, log.Stack(2))
|
||||
g.doShutdown()
|
||||
}
|
||||
}()
|
||||
rc.Run()
|
||||
}
|
||||
|
||||
@@ -89,12 +83,6 @@ func (g *Manager) RunWithCancel(rc RunCanceler) {
|
||||
func (g *Manager) RunWithShutdownContext(run func(context.Context)) {
|
||||
g.runningServerWaitGroup.Add(1)
|
||||
defer g.runningServerWaitGroup.Done()
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
log.Critical("PANIC during RunWithShutdownContext: %v\nStacktrace: %s", err, log.Stack(2))
|
||||
g.doShutdown()
|
||||
}
|
||||
}()
|
||||
ctx := g.ShutdownContext()
|
||||
pprof.SetGoroutineLabels(ctx) // We don't have a label to restore back to but I think this is fine
|
||||
run(ctx)
|
||||
|
||||
Reference in New Issue
Block a user