shell: show which server holds the lock

fix https://github.com/chrislusf/seaweedfs/issues/1983
This commit is contained in:
Chris Lu
2021-04-22 23:56:35 -07:00
parent 89eb9f6e70
commit f0ad172e80
5 changed files with 128 additions and 109 deletions

View File

@@ -1,6 +1,7 @@
package shell
import (
"github.com/chrislusf/seaweedfs/weed/util"
"io"
)
@@ -26,7 +27,7 @@ func (c *commandLock) Help() string {
func (c *commandLock) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
commandEnv.locker.RequestLock()
commandEnv.locker.RequestLock(util.DetectedHostAddress())
return nil
}