Fix heal bucket deadlock after replacing disks (#5661)

Fixes #5659
This commit is contained in:
Harshavardhana
2018-03-16 15:09:31 -07:00
committed by kannappanr
parent 3145462ad2
commit f23944aed7
5 changed files with 49 additions and 30 deletions
+5 -1
View File
@@ -90,7 +90,11 @@ func (s *adminCmd) ReInitFormat(args *ReInitFormatArgs, reply *AuthRPCReply) err
if err := args.IsAuthenticated(); err != nil {
return err
}
_, err := newObjectLayerFn().HealFormat(context.Background(), args.DryRun)
objectAPI := newObjectLayerFn()
if objectAPI == nil {
return errServerNotInitialized
}
_, err := objectAPI.HealFormat(context.Background(), args.DryRun)
return err
}