Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions dgraph/cmd/alpha/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
"github.com/spf13/cobra"
"go.opencensus.io/plugin/ocgrpc"
"go.opentelemetry.io/contrib/zpages"
"golang.org/x/net/trace"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
_ "google.golang.org/grpc/encoding/gzip" // grpc compression
Expand Down Expand Up @@ -799,13 +798,6 @@ func run() {
worker.InitServerState()
worker.InitTasks()

if Alpha.Conf.GetBool("expose_trace") {
// TODO: Remove this once we get rid of event logs.
trace.AuthRequest = func(req *http.Request) (any, sensitive bool) {
return true, true
}
}

// Posting will initialize index which requires schema. Hence, initialize
// schema before calling posting.Init().
schema.Init(worker.State.Pstore)
Expand Down
2 changes: 0 additions & 2 deletions dgraph/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ func initCmds() {
"overridden to values set with environment variables and flags.")
RootCmd.PersistentFlags().Bool("bindall", true,
"Use 0.0.0.0 instead of localhost to bind to all addresses on local machine.")
RootCmd.PersistentFlags().Bool("expose_trace", false,
"Allow trace endpoint to be accessible from remote")
x.Check(rootConf.BindPFlags(RootCmd.PersistentFlags()))

// Add all existing global flag (eg: from glog) to rootCmd's flags
Expand Down
14 changes: 7 additions & 7 deletions dgraph/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
read_only: true
command:
/gobin/dgraph ${COVERAGE_OUTPUT} zero --telemetry "reports=false; sentry=false;"
--my=zero1:5080 --replicas 3 --raft="idx=1" --logtostderr -v=2 --bindall --expose_trace
--my=zero1:5080 --replicas 3 --raft="idx=1" --logtostderr -v=2 --bindall
--profile_mode block --block_rate 10

zero2:
Expand Down Expand Up @@ -84,7 +84,7 @@ services:
command:
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --telemetry "reports=false;" --encryption
"key-file=/dgraph-enc/enc-key;" --my=alpha1:7080 --zero=zero1:5080,zero2:5080,zero3:5080
--expose_trace --profile_mode block --block_rate 10 --logtostderr -v=2 --security
--profile_mode block --block_rate 10 --logtostderr -v=2 --security
"whitelist=0.0.0.0/0;" --acl "secret-file=/dgraph-acl/hmac-secret; access-ttl=20s;"

alpha2:
Expand Down Expand Up @@ -113,7 +113,7 @@ services:
service: alpha
command:
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --encryption "key-file=/dgraph-enc/enc-key;"
--my=alpha2:7080 --zero=zero1:5080,zero2:5080,zero3:5080 --expose_trace --profile_mode block
--my=alpha2:7080 --zero=zero1:5080,zero2:5080,zero3:5080 --profile_mode block
--block_rate 10 --logtostderr -v=2 --security "whitelist=0.0.0.0/0;" --acl
"secret-file=/dgraph-acl/hmac-secret; access-ttl=20s;"

Expand Down Expand Up @@ -143,7 +143,7 @@ services:
service: alpha
command:
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --encryption "key-file=/dgraph-enc/enc-key;"
--my=alpha3:7080 --zero=zero1:5080,zero2:5080,zero3:5080 --expose_trace --profile_mode block
--my=alpha3:7080 --zero=zero1:5080,zero2:5080,zero3:5080 --profile_mode block
--block_rate 10 --logtostderr -v=2 --security "whitelist=0.0.0.0/0;" --acl
"secret-file=/dgraph-acl/hmac-secret; access-ttl=20s;"

Expand Down Expand Up @@ -173,7 +173,7 @@ services:
service: alpha
command:
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --encryption "key-file=/dgraph-enc/enc-key;"
--my=alpha4:7080 --zero=zero1:5080,zero2:5080,zero3:5080 --expose_trace --profile_mode block
--my=alpha4:7080 --zero=zero1:5080,zero2:5080,zero3:5080 --profile_mode block
--block_rate 10 --logtostderr -v=2 --security "whitelist=0.0.0.0/0;" --acl
"secret-file=/dgraph-acl/hmac-secret; access-ttl=20s;"

Expand Down Expand Up @@ -203,7 +203,7 @@ services:
service: alpha
command:
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --encryption "key-file=/dgraph-enc/enc-key;"
--my=alpha5:7080 --zero=zero1:5080,zero2:5080,zero3:5080 --expose_trace --profile_mode block
--my=alpha5:7080 --zero=zero1:5080,zero2:5080,zero3:5080 --profile_mode block
--block_rate 10 --logtostderr -v=2 --security "whitelist=0.0.0.0/0;" --acl
"secret-file=/dgraph-acl/hmac-secret; access-ttl=20s;"

Expand Down Expand Up @@ -233,7 +233,7 @@ services:
service: alpha
command:
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --encryption "key-file=/dgraph-enc/enc-key;"
--my=alpha6:7080 --zero=zero1:5080,zero2:5080,zero3:5080 --expose_trace --profile_mode block
--my=alpha6:7080 --zero=zero1:5080,zero2:5080,zero3:5080 --profile_mode block
--block_rate 10 --logtostderr -v=2 --security "whitelist=0.0.0.0/0;" --acl
"secret-file=/dgraph-acl/hmac-secret; access-ttl=20s;"

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ require (
golang.org/x/crypto v0.47.0
golang.org/x/exp v0.0.0-20260112195511-716be5621a96
golang.org/x/mod v0.32.0
golang.org/x/net v0.49.0
golang.org/x/sync v0.19.0
golang.org/x/sys v0.40.0
golang.org/x/term v0.39.0
Expand Down Expand Up @@ -172,6 +171,7 @@ require (
go.uber.org/multierr v1.11.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/net v0.49.0 // indirect
golang.org/x/time v0.14.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect
Expand Down
4 changes: 2 additions & 2 deletions graphql/e2e/admin_auth/poorman_auth/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
read_only: true
command:
/gobin/dgraph ${COVERAGE_OUTPUT} zero --telemetry "reports=false;" --my=zero1:5080
--logtostderr -v=2 --bindall --expose_trace --profile_mode block --block_rate 10
--logtostderr -v=2 --bindall --profile_mode block --block_rate 10

alpha1:
image: dgraph/dgraph:local
Expand All @@ -33,6 +33,6 @@ services:
cluster: test
service: alpha1
command:
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --my=alpha1:7080 --zero=zero1:5080 --expose_trace
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --my=alpha1:7080 --zero=zero1:5080
--profile_mode block --block_rate 10 --logtostderr -v=2 --security "whitelist=0.0.0.0/0;
token=itIsSecret;" --trace "ratio=1.0;"
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
read_only: true
command:
/gobin/dgraph ${COVERAGE_OUTPUT} zero --telemetry "reports=false;" --my=zero1:5080
--logtostderr -v=2 --bindall --expose_trace --profile_mode block --block_rate 10
--logtostderr -v=2 --bindall --profile_mode block --block_rate 10

alpha1:
image: dgraph/dgraph:local
Expand All @@ -37,7 +37,7 @@ services:
cluster: test
service: alpha1
command:
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --my=alpha1:7080 --zero=zero1:5080 --expose_trace
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --my=alpha1:7080 --zero=zero1:5080
--profile_mode block --block_rate 10 --logtostderr -v=2 --security "whitelist=0.0.0.0/0;
token=itIsSecret;" --acl "secret-file=/dgraph-acl/hmac-secret; access-ttl=3s;" --trace
"ratio=1.0;"
4 changes: 2 additions & 2 deletions graphql/e2e/auth/debug_off/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
read_only: true
command:
/gobin/dgraph ${COVERAGE_OUTPUT} zero --telemetry "reports=false;" --logtostderr -v=2
--bindall --expose_trace --profile_mode block --block_rate 10 --my=zero1:5080
--bindall --profile_mode block --block_rate 10 --my=zero1:5080

alpha1:
image: dgraph/dgraph:local
Expand All @@ -33,6 +33,6 @@ services:
cluster: test
service: alpha1
command:
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --zero=zero1:5080 --expose_trace --profile_mode block
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --zero=zero1:5080 --profile_mode block
--block_rate 10 --logtostderr -v=3 --my=alpha1:7080 --security "whitelist=0.0.0.0/0;" --trace
"ratio=1.0;"
4 changes: 2 additions & 2 deletions graphql/e2e/auth/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
read_only: true
command:
/gobin/dgraph ${COVERAGE_OUTPUT} zero --telemetry "reports=false;" --logtostderr -v=2
--bindall --expose_trace --profile_mode block --block_rate 10 --my=zero1:5080
--bindall --profile_mode block --block_rate 10 --my=zero1:5080

alpha1:
image: dgraph/dgraph:local
Expand All @@ -33,6 +33,6 @@ services:
cluster: test
service: alpha1
command:
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --zero=zero1:5080 --expose_trace --profile_mode block
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --zero=zero1:5080 --profile_mode block
--block_rate 10 --logtostderr -v=3 --my=alpha1:7080 --security "whitelist=0.0.0.0/0;"
--graphql "debug=true;" --trace "ratio=1.0;"
4 changes: 2 additions & 2 deletions graphql/e2e/auth_closed_by_default/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
read_only: true
command:
/gobin/dgraph ${COVERAGE_OUTPUT} zero --telemetry "reports=false;" --logtostderr -v=2
--bindall --expose_trace --profile_mode block --block_rate 10 --my=zero1:5080
--bindall --profile_mode block --block_rate 10 --my=zero1:5080

alpha1:
image: dgraph/dgraph:local
Expand All @@ -33,6 +33,6 @@ services:
cluster: test
service: alpha1
command:
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --zero=zero1:5080 --expose_trace --profile_mode block
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --zero=zero1:5080 --profile_mode block
--block_rate 10 --logtostderr -v=3 --my=alpha1:7080 --security "whitelist=0.0.0.0/0;"
--graphql "debug=true;" --trace "ratio=1.0;"
4 changes: 2 additions & 2 deletions graphql/e2e/directives/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
read_only: true
command:
/gobin/dgraph ${COVERAGE_OUTPUT} zero --telemetry "reports=false;" --logtostderr -v=2
--bindall --expose_trace --profile_mode block --block_rate 10 --my=zero1:5080
--bindall --profile_mode block --block_rate 10 --my=zero1:5080

alpha1:
image: dgraph/dgraph:local
Expand All @@ -33,7 +33,7 @@ services:
cluster: test
service: alpha1
command:
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --zero=zero1:5080 --expose_trace --profile_mode block
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --zero=zero1:5080 --profile_mode block
--block_rate 10 --logtostderr -v=2 --my=alpha1:7080 --security "whitelist=0.0.0.0/0;"
--graphql "lambda-url=http://lambda:8686/graphql-worker; debug=true;" --trace "ratio=1.0;"

Expand Down
4 changes: 2 additions & 2 deletions graphql/e2e/normal/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
read_only: true
command:
/gobin/dgraph ${COVERAGE_OUTPUT} zero --telemetry "reports=false;" --logtostderr -v=2
--bindall --expose_trace --profile_mode block --block_rate 10 --my=zero1:5080
--bindall --profile_mode block --block_rate 10 --my=zero1:5080

alpha1:
image: dgraph/dgraph:local
Expand All @@ -33,7 +33,7 @@ services:
cluster: test
service: alpha1
command:
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --zero=zero1:5080 --expose_trace --profile_mode block
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --zero=zero1:5080 --profile_mode block
--block_rate 10 --logtostderr -v=2 --my=alpha1:7080 --security "whitelist=0.0.0.0/0;"
--graphql "lambda-url=http://lambda:8686/graphql-worker; debug=true;" --trace "ratio=1.0;"

Expand Down
11 changes: 2 additions & 9 deletions raftwal/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ import (
"math"
"sync"

"github.com/dgraph-io/dgraph/v25/x"
"github.com/golang/glog"
"github.com/pkg/errors"
"go.etcd.io/etcd/raft/v3"
"go.etcd.io/etcd/raft/v3/raftpb"
"golang.org/x/net/trace"

"github.com/dgraph-io/dgraph/v25/x"
)

// DiskStorage handles disk access and writing for the RAFT write-ahead log.
Expand Down Expand Up @@ -58,8 +56,7 @@ import (
// HardSync is set, msync is called after every write, which flushes those
// writes to disk.
type DiskStorage struct {
dir string
elog trace.EventLog
dir string

meta *metaFile
wal *wal
Expand Down Expand Up @@ -92,8 +89,6 @@ func InitEncrypted(dir string, encKey x.Sensitive) (*DiskStorage, error) {
return nil, err
}

w.elog = trace.NewEventLog("Badger", "RaftStorage")

snap, err := w.meta.snapshot()
if err != nil {
return nil, err
Expand Down Expand Up @@ -150,8 +145,6 @@ func (w *DiskStorage) InitialState() (hs raftpb.HardState, cs raftpb.ConfState,
w.lock.Lock()
defer w.lock.Unlock()

w.elog.Printf("InitialState")
defer w.elog.Printf("Done")
hs, err = w.meta.HardState()
if err != nil {
return
Expand Down
8 changes: 2 additions & 6 deletions schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (

"github.com/golang/glog"
"github.com/pkg/errors"
"golang.org/x/net/trace"
"google.golang.org/protobuf/proto"

"github.com/dgraph-io/badger/v4"
Expand Down Expand Up @@ -52,7 +51,6 @@ func GetWriteContext(ctx context.Context) context.Context {
func (s *state) init() {
s.predicate = make(map[string]*pb.SchemaUpdate)
s.types = make(map[string]*pb.TypeUpdate)
s.elog = trace.NewEventLog("Dgraph", "Schema")
s.mutSchema = make(map[string]*pb.SchemaUpdate)
}

Expand All @@ -61,7 +59,6 @@ type state struct {
// Map containing predicate to type information.
predicate map[string]*pb.SchemaUpdate
types map[string]*pb.TypeUpdate
elog trace.EventLog
// mutSchema holds the schema update that is being applied in the background.
mutSchema map[string]*pb.SchemaUpdate
}
Expand Down Expand Up @@ -198,7 +195,7 @@ func (s *state) Set(pred string, schema *pb.SchemaUpdate) {
s.Lock()
defer s.Unlock()
s.predicate[pred] = schema
s.elog.Printf(logUpdate(schema, pred))
glog.Infoln(logUpdate(schema, pred))
}

// SetMutSchema sets the mutation schema for the given predicate.
Expand Down Expand Up @@ -237,7 +234,7 @@ func (s *state) SetType(typeName string, typ *pb.TypeUpdate) {
s.Lock()
defer s.Unlock()
s.types[typeName] = typ
s.elog.Printf(logTypeUpdate(typ, typeName))
glog.Infoln(logTypeUpdate(typ, typeName))
}

// Get gets the schema for the given predicate.
Expand Down Expand Up @@ -552,7 +549,6 @@ func Load(predicate string) error {
return err
}
State().Set(predicate, &s)
State().elog.Printf(logUpdate(&s, predicate))
glog.Infoln(logUpdate(&s, predicate))
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions systest/cloud/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
read_only: true
command:
/gobin/dgraph zero --telemetry "reports=false;" --my=zero1:5080 --raft="idx=1" --logtostderr
-v=2 --bindall --expose_trace --profile_mode block --block_rate 10
-v=2 --bindall --profile_mode block --block_rate 10

alpha1:
image: dgraph/dgraph:local
Expand All @@ -39,7 +39,7 @@ services:
cluster: test
service: alpha
command:
/gobin/dgraph alpha --my=alpha1:7080 --zero=zero1:5080,zero2:5080,zero3:5080 --expose_trace
/gobin/dgraph alpha --my=alpha1:7080 --zero=zero1:5080,zero2:5080,zero3:5080
--profile_mode block --block_rate 10 --logtostderr -v=2 --security "whitelist=0.0.0.0/0;"
--acl "secret-file=/dgraph-acl/hmac-secret; access-ttl=20s;" --limit "shared-instance=true"

Expand Down
4 changes: 2 additions & 2 deletions systest/multi-tenancy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
read_only: true
command:
/gobin/dgraph ${COVERAGE_OUTPUT} zero --telemetry "reports=false;"
--my=zero1:5080 --raft="idx=1" --logtostderr -v=2 --bindall --expose_trace --profile_mode
--my=zero1:5080 --raft="idx=1" --logtostderr -v=2 --bindall --profile_mode
block --block_rate 10 --limit refill-interval=20s --limit uid-lease=50
alpha1:
image: dgraph/dgraph:local
Expand All @@ -42,6 +42,6 @@ services:
service: alpha
command:
/gobin/dgraph ${COVERAGE_OUTPUT} alpha --encryption "key-file=/dgraph-enc/enc-key;"
--my=alpha1:7080 --zero=zero1:5080,zero2:5080,zero3:5080 --expose_trace --profile_mode block
--my=alpha1:7080 --zero=zero1:5080,zero2:5080,zero3:5080 --profile_mode block
--block_rate 10 --logtostderr -v=2 --security "whitelist=0.0.0.0/0;" --acl
"secret-file=/dgraph-acl/hmac-secret; access-ttl=20s;"
5 changes: 2 additions & 3 deletions testutil/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package testutil
import (
"archive/tar"
"bytes"
"context"
"fmt"
"io"
"log"
Expand All @@ -17,13 +18,11 @@ import (
"strings"
"time"

"github.com/dgraph-io/dgraph/v25/x"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/client"
"github.com/golang/glog"
"github.com/pkg/errors"
"golang.org/x/net/context"

"github.com/dgraph-io/dgraph/v25/x"
)

const (
Expand Down
Loading