forked from TrueCloudLab/frostfs-node
[#67] node: Make engine's IsLocked
public
It will allow reusing that method in expiration checks. Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
This commit is contained in:
parent
22be532cbd
commit
f006f3b342
1 changed files with 3 additions and 2 deletions
|
@ -81,7 +81,7 @@ func (e *StorageEngine) inhume(prm InhumePrm) (InhumeRes, error) {
|
||||||
|
|
||||||
for i := range prm.addrs {
|
for i := range prm.addrs {
|
||||||
if !prm.forceRemoval {
|
if !prm.forceRemoval {
|
||||||
locked, err := e.isLocked(prm.addrs[i])
|
locked, err := e.IsLocked(prm.addrs[i])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e.log.Warn("removing an object without full locking check",
|
e.log.Warn("removing an object without full locking check",
|
||||||
zap.Error(err),
|
zap.Error(err),
|
||||||
|
@ -179,7 +179,8 @@ func (e *StorageEngine) inhumeAddr(addr oid.Address, prm shard.InhumePrm, checkE
|
||||||
return ok, retErr
|
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 locked bool
|
||||||
var err error
|
var err error
|
||||||
var outErr error
|
var outErr error
|
||||||
|
|
Loading…
Reference in a new issue