Skip to content

Commit

Permalink
node: Make engine's IsLocked public
Browse files Browse the repository at this point in the history
It will allow reusing that method in expiration checks.

Signed-off-by: Pavel Karpy <[email protected]>
  • Loading branch information
carpawell committed Aug 31, 2023
1 parent 9871712 commit f9ccab8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/local_object_storage/engine/inhume.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (e *StorageEngine) inhume(prm InhumePrm) (InhumeRes, error) {

for i := range prm.addrs {
if !prm.forceRemoval {
locked, err := e.isLocked(prm.addrs[i])
locked, err := e.IsLocked(prm.addrs[i])
if err != nil {
e.log.Warn("removing an object without full locking check",
zap.Error(err),
Expand Down Expand Up @@ -179,7 +179,8 @@ func (e *StorageEngine) inhumeAddr(addr oid.Address, prm shard.InhumePrm, checkE
return ok, retErr
}

func (e *StorageEngine) isLocked(addr oid.Address) (bool, error) {
// IsLocked checks whether an object is locked according to StorageEngine's state.
func (e *StorageEngine) IsLocked(addr oid.Address) (bool, error) {
var locked bool
var err error
var outErr error
Expand Down

0 comments on commit f9ccab8

Please sign in to comment.