[#2145] meta: Do allow force inhuming a locked object

Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
pull/5/head
Pavel Karpy 2022-12-14 20:23:31 +03:00 committed by Anton Nikiforov
parent a30310b2ca
commit 21c58c92a9
2 changed files with 2 additions and 1 deletions

View File

@ -58,6 +58,7 @@ Changelog for NeoFS Node
- Spawning useless `GETRANGE` with zero length for a big object (#2101)
- Incomplete object put errors do contain the deepest error's message (#2092)
- Prioritize internal addresses for clients (#2156)
- Force object removal via control service (#2145)
### Removed
- `-g` option from `neofs-cli control ...` and `neofs-cli container create` commands (#2089)

View File

@ -144,7 +144,7 @@ func (db *DB) Inhume(prm InhumePrm) (res InhumeRes, err error) {
cnr := prm.target[i].Container()
// prevent locked objects to be inhumed
if objectLocked(tx, cnr, id) {
if !prm.forceRemoval && objectLocked(tx, cnr, id) {
return apistatus.ObjectLocked{}
}