[#9999] metabase: Do not store root info for small objects
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
2bfaa65455
commit
a62d76fd6f
2 changed files with 5 additions and 13 deletions
|
@ -251,19 +251,11 @@ func putUniqueIndexes(
|
|||
}
|
||||
|
||||
// index root object
|
||||
if obj.Type() == objectSDK.TypeRegular && !obj.HasParent() {
|
||||
var (
|
||||
err error
|
||||
splitInfo []byte
|
||||
)
|
||||
|
||||
if isParent {
|
||||
splitInfo, err = si.Marshal()
|
||||
if obj.Type() == objectSDK.TypeRegular && !obj.HasParent() && isParent {
|
||||
splitInfo, err := si.Marshal()
|
||||
if err != nil {
|
||||
return fmt.Errorf("can't marshal split info: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
err = putUniqueIndexItem(tx, namedBucketItem{
|
||||
name: rootBucketName(cnr, bucketName),
|
||||
key: objKey,
|
||||
|
|
|
@ -194,7 +194,7 @@ func TestDB_SelectRootPhyParent(t *testing.T) {
|
|||
fs := objectSDK.SearchFilters{}
|
||||
fs.AddRootFilter()
|
||||
testSelect(t, db, cnr, fs,
|
||||
object.AddressOf(small),
|
||||
// object.AddressOf(small),
|
||||
object.AddressOf(parent),
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue