Skip to content

Commit

Permalink
Optimize query: UID expansion (dgraph-io#2772)
Browse files Browse the repository at this point in the history
Add a lot of Open Census tracing in query path execution.
Run handleUidPostings concurrently using 64 goroutines.
  • Loading branch information
manishrjain authored and dna2github committed Jul 19, 2019
1 parent c4c55db commit 8d61a76
Show file tree
Hide file tree
Showing 2 changed files with 192 additions and 99 deletions.
9 changes: 8 additions & 1 deletion query/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -1835,7 +1835,14 @@ func getReversePredicates(ctx context.Context) ([]string, error) {
// ProcessGraph processes the SubGraph instance accumulating result for the query
// from different instances. Note: taskQuery is nil for root node.
func ProcessGraph(ctx context.Context, sg, parent *SubGraph, rch chan error) {
ctx, span := otrace.StartSpan(ctx, "query.ProcessGraph")
var suffix string
if len(sg.Params.Alias) > 0 {
suffix += "." + sg.Params.Alias
}
if len(sg.Attr) > 0 {
suffix += "." + sg.Attr
}
ctx, span := otrace.StartSpan(ctx, "query.ProcessGraph"+suffix)
defer span.End()

if sg.Attr == "uid" {
Expand Down
Loading

0 comments on commit 8d61a76

Please sign in to comment.