Move changes from the support branch. #58

Merged
fyrchik merged 25 commits from move-changes into master 2023-02-20 10:53:28 +00:00
2 changed files with 7 additions and 1 deletions
Showing only changes of commit e17bf71d19 - Show all commits

View file

@ -27,6 +27,7 @@ Changelog for FrostFS Node
- Fix `dirty` suffix in debian package version (#53)
- Prevent node process from killing by systemd when shutting down (#1465)
- Restore subscriptions correctly on morph client switch (#2212)
- Expired objects could be returned if not marked with GC yet (#2213)
### Removed
### Updated

View file

@ -74,6 +74,7 @@ func (e *StorageEngine) get(prm GetPrm) (GetRes, error) {
shPrm.SetAddress(prm.addr)
var hasDegraded bool
var objectExpired bool
e.iterateOverSortedShards(prm.addr, func(_ int, sh hashedShard) (stop bool) {
noMeta := sh.GetMode().NoMetabase()
@ -113,7 +114,7 @@ func (e *StorageEngine) get(prm GetPrm) (GetRes, error) {
case shard.IsErrObjectExpired(err):
// object is found but should not
// be returned
outError = errNotFound
objectExpired = true
return true
default:
e.reportShardError(sh, "could not get object from shard", err)
@ -130,6 +131,10 @@ func (e *StorageEngine) get(prm GetPrm) (GetRes, error) {
return GetRes{}, logicerr.Wrap(objectSDK.NewSplitInfoError(outSI))
}
if objectExpired {
return GetRes{}, errNotFound
}
if obj == nil {
if !hasDegraded && shardWithMeta.Shard == nil || !shard.IsErrNotFound(outError) {
return GetRes{}, outError