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

Remove locking from DgsSchemaProvider #1984

Merged
merged 2 commits into from
Aug 14, 2024
Merged

Conversation

kilink
Copy link
Member

@kilink kilink commented Aug 12, 2024

DgsSchemaProvider used a ReentrantReadWriteLock to guard access to mutable fields that are populated during schema generation; remove the need for the lock by combining the mutable fields into a single class, DataFetcherInfo, the instance of which is accessible via an AtomicReference; the schema method no longer needs to mutate fields on the DgsSchemaProvider directly, and the only thing stored on the schema provider itself is immutable.

DgsSchemaProvider used a ReentrantReadWriteLock to guard access to mutable
fields that are populated during schema generation. Remove the need for
the lock by combining the mutable fields into a immutable holder, DataFetcherInfo,
the instance of which is accessible via an AtomicReference.
@kilink kilink force-pushed the remove-schema-provider-lock branch from e08e7bc to 58b8039 Compare August 12, 2024 03:01
@kilink kilink merged commit 3be2d9d into master Aug 14, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants