diff --git a/pkg/local_object_storage/metabase/counter.go b/pkg/local_object_storage/metabase/counter.go index 4d860261c..275099ff2 100644 --- a/pkg/local_object_storage/metabase/counter.go +++ b/pkg/local_object_storage/metabase/counter.go @@ -527,10 +527,14 @@ func containerObjectCounterInitialized(tx *bbolt.Tx) bool { } func IsUserObject(obj *objectSDK.Object) bool { - _, hasParentID := obj.ParentID() - return obj.Type() == objectSDK.TypeRegular && - (obj.SplitID() == nil || - (hasParentID && len(obj.Children()) == 0)) + ech := obj.ECHeader() + if ech == nil { + _, hasParentID := obj.ParentID() + return obj.Type() == objectSDK.TypeRegular && + (obj.SplitID() == nil || + (hasParentID && len(obj.Children()) == 0)) + } + return ech.Index() == 0 && (ech.ParentSplitID() == nil || ech.ParentSplitParentID() != nil) } // ZeroSizeContainers returns containers with size = 0.