[#241] object/search: Set container ID parameter of storage engine call

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-12-10 17:38:45 +03:00 committed by Alex Vanin
parent 611a29f682
commit 627012e4fe
2 changed files with 2 additions and 5 deletions

View file

@ -39,10 +39,6 @@ func (exec *execCtx) prepare() {
if _, ok := exec.prm.writer.(*uniqueIDWriter); !ok {
exec.prm.writer = newUniqueAddressWriter(exec.prm.writer)
}
fs := exec.prm.SearchFilters()
fs.AddObjectContainerIDFilter(objectSDK.MatchStringEqual, exec.containerID())
exec.prm.WithSearchFilters(fs)
}
func (exec *execCtx) setLogger(l *logger.Logger) {

View file

@ -82,7 +82,8 @@ func (c *clientWrapper) searchObjects(exec *execCtx) ([]*objectSDK.ID, error) {
func (e *storageEngineWrapper) search(exec *execCtx) ([]*objectSDK.ID, error) {
r, err := (*engine.StorageEngine)(e).Select(new(engine.SelectPrm).
WithFilters(exec.searchFilters()),
WithFilters(exec.searchFilters()).
WithContainerID(exec.containerID()),
)
if err != nil {
return nil, err