Deprecate ListLocks and ClearLocks (#6233)

No locks are ever left in memory, we also
have a periodic interval of clearing stale locks
anyways. The lock instrumentation was not complete
and was seldom used.

Deprecate this for now and bring it back later if
it is really needed. This also in-turn seems to improve
performance slightly.
This commit is contained in:
Harshavardhana
2018-08-02 10:39:42 -07:00
committed by Nitish Tiwari
parent eb391a53c1
commit 556a51120c
23 changed files with 6 additions and 2042 deletions
-15
View File
@@ -19,7 +19,6 @@ package cmd
import (
"context"
"path"
"time"
"github.com/gorilla/mux"
"github.com/minio/minio/cmd/logger"
@@ -47,20 +46,6 @@ func (receiver *adminRPCReceiver) SignalService(args *SignalServiceArgs, reply *
return receiver.local.SignalService(args.Sig)
}
// ListLocksQuery - wraps ListLocks API's query values to send over RPC.
type ListLocksQuery struct {
AuthArgs
Bucket string
Prefix string
Duration time.Duration
}
// ListLocks - lists locks held by requests handled by this server instance.
func (receiver *adminRPCReceiver) ListLocks(args *ListLocksQuery, reply *[]VolumeLockInfo) (err error) {
*reply, err = receiver.local.ListLocks(args.Bucket, args.Prefix, args.Duration)
return err
}
// ServerInfo - returns the server info when object layer was initialized on this server.
func (receiver *adminRPCReceiver) ServerInfo(args *AuthArgs, reply *ServerInfoData) (err error) {
*reply, err = receiver.local.ServerInfo()