2022-03-17 08:03:58 +00:00
|
|
|
package meta
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
|
2023-03-07 13:38:26 +00:00
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/util/logicerr"
|
|
|
|
apistatus "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/client/status"
|
2022-03-17 08:03:58 +00:00
|
|
|
)
|
|
|
|
|
2022-10-31 07:08:30 +00:00
|
|
|
// ErrObjectIsExpired is returned when the requested object's
|
|
|
|
// epoch is less than the current one. Such objects are considered
|
|
|
|
// as removed and should not be returned from the Storage Engine.
|
|
|
|
var ErrObjectIsExpired = logicerr.New("object is expired")
|
|
|
|
|
2022-03-17 08:03:58 +00:00
|
|
|
// IsErrRemoved checks if error returned by Shard Exists/Get/Put method
|
|
|
|
// corresponds to removed object.
|
|
|
|
func IsErrRemoved(err error) bool {
|
|
|
|
return errors.As(err, new(apistatus.ObjectAlreadyRemoved))
|
|
|
|
}
|