[v11.2.x] Annotations: Fix composite store read (#94182)
Annotations: Fix composite store read (#94158)
* Annotations: Fix composite store read
* Add test
* check error
(cherry picked from commit bd1741653d)
This commit is contained in:
@@ -31,7 +31,7 @@ func (c *CompositeStore) Type() string {
|
||||
}
|
||||
|
||||
// Get returns annotations from all stores, and combines the results.
|
||||
func (c *CompositeStore) Get(ctx context.Context, query *annotations.ItemQuery, accessResources *accesscontrol.AccessResources) ([]*annotations.ItemDTO, error) {
|
||||
func (c *CompositeStore) Get(ctx context.Context, query annotations.ItemQuery, accessResources *accesscontrol.AccessResources) ([]*annotations.ItemDTO, error) {
|
||||
itemCh := make(chan []*annotations.ItemDTO, len(c.readers))
|
||||
|
||||
err := concurrency.ForEachJob(ctx, len(c.readers), len(c.readers), func(ctx context.Context, i int) (err error) {
|
||||
@@ -56,7 +56,7 @@ func (c *CompositeStore) Get(ctx context.Context, query *annotations.ItemQuery,
|
||||
}
|
||||
|
||||
// GetTags returns tags from all stores, and combines the results.
|
||||
func (c *CompositeStore) GetTags(ctx context.Context, query *annotations.TagsQuery) (annotations.FindTagsResult, error) {
|
||||
func (c *CompositeStore) GetTags(ctx context.Context, query annotations.TagsQuery) (annotations.FindTagsResult, error) {
|
||||
resCh := make(chan annotations.FindTagsResult, len(c.readers))
|
||||
|
||||
err := concurrency.ForEachJob(ctx, len(c.readers), len(c.readers), func(ctx context.Context, i int) (err error) {
|
||||
|
||||
Reference in New Issue
Block a user