forked from TrueCloudLab/frostfs-node
[#137] metabase: Do not select objects if there is no filterable attribute
In previous metabase implementation the absence of an attribute presented in the search filter did not exclude the object from the result. Change this behavior to exclude the object from the result. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
d9a5007c72
commit
3bbf1d6a60
1 changed files with 2 additions and 1 deletions
|
@ -32,7 +32,8 @@ func (db *DB) Select(fs object.SearchFilters) ([]*object.Address, error) {
|
|||
// get bucket with values
|
||||
keyBucket := indexBucket.Bucket([]byte(key))
|
||||
if keyBucket == nil {
|
||||
continue
|
||||
// no object has this attribute => empty result
|
||||
return nil
|
||||
}
|
||||
|
||||
fVal := f.Value()
|
||||
|
|
Loading…
Reference in a new issue