-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Add LogRequest variable to config input (#5197) Fixes: DGRAPH-1123 This PR adds support for logRequest config param. logRequest can have true/false values. True value of logRequest enables logging of all requests coming to alphas. False value of logRequest disables it. Users will be able to dynamically change this param using graphql admin endpoint. Sample query: mutation { config(input: {logRequest: true}){ response { code message } } } Internally we have added one more field in WorkerOptions(WorkerConfig) called as LogRequest of int32 type. Value of this field is checked atomically upon every request arrival. If value of LogRequest is 1, it results in logging of requests. Co-authored-by: Ashish Goswami <[email protected]> (cherry picked from commit 449c06b) * fix(GraphQL): don't update cacheMb if not specified by user (GRAPHQL-888) (#7103) Fixes GRAPHQL-888. Previously, if you ran this request: ``` $ curl -H "Content-Type: application/json" http://localhost:8080/admin -d '{"query": "mutation {config(input: {logRequest: false}){response {code message}}}"}' ``` Alpha logs would also print this: ``` I1205 22:22:51.684693 2681396 middlewares.go:178] GraphQL admin mutation. Name = config I1205 22:22:51.684724 2681396 config.go:38] Got config update through GraphQL admin API I1205 22:22:51.684810 2681396 worker.go:138] Updating cacheMb to 0 ``` Indicating that cacheMb was also updated, even it wasn't specified in the request. This PR fixes this issue. (cherry picked from commit c03c327) # Conflicts: # graphql/admin/config.go Co-authored-by: Animesh Chandra Pathak <[email protected]> Co-authored-by: Abhimanyu Singh Gaur <[email protected]>
- Loading branch information
1 parent
91387c2
commit 07b87c2
Showing
5 changed files
with
43 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters