Skip to content

Commit

Permalink
Merge pull request #9647 from 2403905/issue-9642
Browse files Browse the repository at this point in the history
Fixed the channel lock in a workers pool
  • Loading branch information
2403905 committed Jul 18, 2024
2 parents da2e202 + 7f9e018 commit ffe1542
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/fix-workers-lock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Fixed the channel lock in a workers pool

We fixed an error when the users can't see more than 10 shares

https://github.com/owncloud/ocis/pull/9647
https://github.com/owncloud/ocis/issues/9642
4 changes: 2 additions & 2 deletions services/graph/pkg/service/v0/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ func cs3ReceivedSharesToDriveItems(ctx context.Context,
identityCache identity.IdentityCache,
receivedShares []*collaboration.ReceivedShare) ([]libregraph.DriveItem, error) {

ch := make(chan libregraph.DriveItem)
group := new(errgroup.Group)
// Set max concurrency
group.SetLimit(10)
Expand All @@ -160,6 +159,7 @@ func cs3ReceivedSharesToDriveItems(ctx context.Context,
receivedSharesByResourceID[rIDStr] = append(receivedSharesByResourceID[rIDStr], receivedShare)
}

ch := make(chan libregraph.DriveItem, len(receivedSharesByResourceID))
for _, receivedSharesForResource := range receivedSharesByResourceID {
receivedShares := receivedSharesForResource

Expand Down Expand Up @@ -477,7 +477,6 @@ func cs3ReceivedOCMSharesToDriveItems(ctx context.Context,
identityCache identity.IdentityCache,
receivedShares []*ocm.ReceivedShare) ([]libregraph.DriveItem, error) {

ch := make(chan libregraph.DriveItem)
group := new(errgroup.Group)
// Set max concurrency
group.SetLimit(10)
Expand All @@ -488,6 +487,7 @@ func cs3ReceivedOCMSharesToDriveItems(ctx context.Context,
receivedSharesByResourceID[rIDStr] = append(receivedSharesByResourceID[rIDStr], receivedShare)
}

ch := make(chan libregraph.DriveItem, len(receivedSharesByResourceID))
for _, receivedSharesForResource := range receivedSharesByResourceID {
receivedShares := receivedSharesForResource

Expand Down

0 comments on commit ffe1542

Please sign in to comment.