[#241] object/search: Set container ID parameter of storage engine call
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
611a29f682
commit
627012e4fe
2 changed files with 2 additions and 5 deletions
|
@ -39,10 +39,6 @@ func (exec *execCtx) prepare() {
|
||||||
if _, ok := exec.prm.writer.(*uniqueIDWriter); !ok {
|
if _, ok := exec.prm.writer.(*uniqueIDWriter); !ok {
|
||||||
exec.prm.writer = newUniqueAddressWriter(exec.prm.writer)
|
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) {
|
func (exec *execCtx) setLogger(l *logger.Logger) {
|
||||||
|
|
|
@ -82,7 +82,8 @@ func (c *clientWrapper) searchObjects(exec *execCtx) ([]*objectSDK.ID, error) {
|
||||||
|
|
||||||
func (e *storageEngineWrapper) search(exec *execCtx) ([]*objectSDK.ID, error) {
|
func (e *storageEngineWrapper) search(exec *execCtx) ([]*objectSDK.ID, error) {
|
||||||
r, err := (*engine.StorageEngine)(e).Select(new(engine.SelectPrm).
|
r, err := (*engine.StorageEngine)(e).Select(new(engine.SelectPrm).
|
||||||
WithFilters(exec.searchFilters()),
|
WithFilters(exec.searchFilters()).
|
||||||
|
WithContainerID(exec.containerID()),
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in a new issue