Use ContainersOf for container list fetching #172

Merged
fyrchik merged 3 commits from fyrchik/frostfs-node:fix-container-list into master 2023-03-27 14:32:56 +00:00
3 changed files with 4 additions and 4 deletions
Showing only changes of commit 48beb51aa2 - Show all commits

View file

@ -242,7 +242,7 @@ func newCachedContainerLister(c *cntClient.Client, ttl time.Duration) ttlContain
}
}
list, err := c.List(id)
list, err := c.ContainersOf(id)
if err != nil {
return nil, err
}
@ -260,7 +260,7 @@ func newCachedContainerLister(c *cntClient.Client, ttl time.Duration) ttlContain
// the cache.
func (s ttlContainerLister) List(id *user.ID) ([]cid.ID, error) {
if id == nil {
return s.client.List(nil)
return s.client.ContainersOf(nil)
}
item, err := s.inner.get(id.EncodeToString())

View file

@ -31,7 +31,7 @@ func (c cnrSource) Get(id cid.ID) (*container.Container, error) {
}
func (c cnrSource) List() ([]cid.ID, error) {
return c.cli.List(nil)
return c.cli.ContainersOf(nil)
}
func initTreeService(c *cfg) {

View file

@ -13,7 +13,7 @@ import (
var ErrInvalidIRNode = errors.New("node is not in the inner ring list")
func (ap *Processor) selectContainersToAudit(epoch uint64) ([]cid.ID, error) {
containers, err := ap.containerClient.List(nil)
containers, err := ap.containerClient.ContainersOf(nil)
if err != nil {
return nil, fmt.Errorf("can't get list of containers to start audit: %w", err)
}