GraphQL: Unlock goroutine throttle to match batch capacity (#20146)
We were throttling the amount of concurrent resolvers at a given time. The idea behind this was to avoid overloading the database with too many requests. However, with the introduction of dataloaders, this limitation actually becomes a bottleneck because all DB calls are actually batched, so we are unnecessarily throttling the amount of items that can be processed in a single batch. The only caveat with this is that now all resolvers need to backed by dataloaders, or otherwise not be queried as part of a loop. In a subsequent PR, we will be removing channel stats from under channel to be a top-level object to be returned for a given channel. ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a3af488492
Коммит
fed5404166
@@ -188,12 +188,12 @@ func TestExportAllUsers(t *testing.T) {
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, 0, i)
|
||||
|
||||
users1, err := th1.App.GetUsers(&model.UserGetOptions{
|
||||
users1, err := th1.App.GetUsersFromProfiles(&model.UserGetOptions{
|
||||
Page: 0,
|
||||
PerPage: 10,
|
||||
})
|
||||
assert.Nil(t, err)
|
||||
users2, err := th2.App.GetUsers(&model.UserGetOptions{
|
||||
users2, err := th2.App.GetUsersFromProfiles(&model.UserGetOptions{
|
||||
Page: 0,
|
||||
PerPage: 10,
|
||||
})
|
||||
@@ -202,13 +202,13 @@ func TestExportAllUsers(t *testing.T) {
|
||||
assert.ElementsMatch(t, users1, users2)
|
||||
|
||||
// Checking whether deactivated users were included in bulk export
|
||||
deletedUsers1, err := th1.App.GetUsers(&model.UserGetOptions{
|
||||
deletedUsers1, err := th1.App.GetUsersFromProfiles(&model.UserGetOptions{
|
||||
Inactive: true,
|
||||
Page: 0,
|
||||
PerPage: 10,
|
||||
})
|
||||
assert.Nil(t, err)
|
||||
deletedUsers2, err := th1.App.GetUsers(&model.UserGetOptions{
|
||||
deletedUsers2, err := th1.App.GetUsersFromProfiles(&model.UserGetOptions{
|
||||
Inactive: true,
|
||||
Page: 0,
|
||||
PerPage: 10,
|
||||
|
||||
Ссылка в новой задаче
Block a user