Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(probe): do not contend for lock in lazy load (#8037) (#8041) #8566

Merged
merged 1 commit into from
Feb 2, 2023

Conversation

mangalaman93
Copy link
Contributor

Earlier the admin server mutex lock was used to protect the graphql schema map. But now we store that in schema store that internally handles the concurrency. Hence, we don't need to take the admin server's read lock to access schema.

/probe/graphql is used as health check and is called very frequently. This rlock on adminserver mutex makes the /probe/graphql requests block while lazy loading when restore operation gets triggered at the startup. That leads to so many go routines being spun up.

(cherry picked from commit 5ad40d8)

@CLAassistant
Copy link

CLAassistant commented Jan 4, 2023

CLA assistant check
All committers have signed the CLA.

@mangalaman93 mangalaman93 added the slash-to-main PRs which bring slash branch on par with main. label Jan 4, 2023
@all-seeing-code
Copy link
Contributor

@mangalaman93 It would be helpful to add a link to the PR which changes the graphql schema store in the PR description to verify this.

@mangalaman93
Copy link
Contributor Author

mangalaman93 commented Jan 4, 2023

That change is there in part of the #8510

@mangalaman93
Copy link
Contributor Author

The old PR is #7925

matthewmcneely
matthewmcneely previously approved these changes Jan 5, 2023
skrdgraph
skrdgraph previously approved these changes Feb 1, 2023
Earlier the admin server mutex lock was used to protect the graphql
schema map. But now we store that in schema store that internally
handles the concurrency. Hence, we don't need to take the admin
server's read lock to access schema.

/probe/graphql is used as health check and is called very frequently.
This rlock on adminserver mutex makes the /probe/graphql requests
block while lazy loading when restore operation gets triggered at
the startup. That leads to so many go routines being spun up.

(cherry picked from commit 5ad40d8)
@coveralls
Copy link

Coverage Status

Coverage: 67.061% (-0.03%) from 67.09% when pulling 2163656 on aman/lock into b100a90 on main.

@mangalaman93 mangalaman93 merged commit 8a302b7 into main Feb 2, 2023
@mangalaman93 mangalaman93 deleted the aman/lock branch February 2, 2023 08:55
all-seeing-code pushed a commit that referenced this pull request Feb 8, 2023
Earlier the admin server mutex lock was used to protect the graphql
schema map. But now we store that in schema store that internally
handles the concurrency. Hence, we don't need to take the admin server's
read lock to access schema.

/probe/graphql is used as health check and is called very frequently.
This rlock on adminserver mutex makes the /probe/graphql requests block
while lazy loading when restore operation gets triggered at the startup.
That leads to so many go routines being spun up.

(cherry picked from commit 5ad40d8)
all-seeing-code pushed a commit that referenced this pull request Feb 8, 2023
Earlier the admin server mutex lock was used to protect the graphql
schema map. But now we store that in schema store that internally
handles the concurrency. Hence, we don't need to take the admin server's
read lock to access schema.

/probe/graphql is used as health check and is called very frequently.
This rlock on adminserver mutex makes the /probe/graphql requests block
while lazy loading when restore operation gets triggered at the startup.
That leads to so many go routines being spun up.

(cherry picked from commit 5ad40d8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
slash-to-main PRs which bring slash branch on par with main.
Development

Successfully merging this pull request may close these issues.

7 participants