fix: add hidden flag to return count number of locks (#3552)

This commit is contained in:
Harshavardhana
2020-12-30 14:58:00 -08:00
committed by GitHub
parent e13737383f
commit c041d86f03
+7 -1
View File
@@ -33,6 +33,12 @@ var topLocksFlag = []cli.Flag{
Name: "stale",
Usage: "list stale locks",
},
cli.IntFlag{
Name: "count",
Usage: "number of top locks",
Hidden: true,
Value: 10,
},
}
var adminTopLocksCmd = cli.Command{
@@ -123,7 +129,7 @@ func mainAdminTopLocks(ctx *cli.Context) error {
// Call top locks API
entries, e := client.TopLocksWithOpts(globalContext, madmin.TopLockOpts{
Count: 10,
Count: ctx.Int("count"),
Stale: ctx.Bool("stale"),
})
fatalIf(probe.NewError(e), "Unable to get server locks list.")