mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
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:
committed by
Nitish Tiwari
parent
eb391a53c1
commit
556a51120c
@@ -1433,24 +1433,3 @@ func (s *xlSets) ListObjectsHeal(ctx context.Context, bucket, prefix, marker, de
|
||||
// Return error at the end.
|
||||
return loi, toObjectErr(err, bucket, prefix)
|
||||
}
|
||||
|
||||
// ListLocks from all sets, aggregate them and return.
|
||||
func (s *xlSets) ListLocks(ctx context.Context, bucket, prefix string, duration time.Duration) (lockInfo []VolumeLockInfo, err error) {
|
||||
for _, set := range s.sets {
|
||||
var setLockInfo []VolumeLockInfo
|
||||
setLockInfo, err = set.ListLocks(ctx, bucket, prefix, duration)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
lockInfo = append(lockInfo, setLockInfo...)
|
||||
}
|
||||
return lockInfo, nil
|
||||
}
|
||||
|
||||
// Clear all requested locks on all sets.
|
||||
func (s *xlSets) ClearLocks(ctx context.Context, lockInfo []VolumeLockInfo) error {
|
||||
for _, set := range s.sets {
|
||||
set.ClearLocks(ctx, lockInfo)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user