From 13ad2afea3ff29cfd8fc26519483468aa3f09be8 Mon Sep 17 00:00:00 2001 From: parasssh Date: Wed, 2 Sep 2020 20:54:47 -0700 Subject: [PATCH] fix(dgraph): sentry nil pointer check (#6372) (#6375) (cherry picked from commit 7857fa2cfc5388fa1f5787eea473ab900f51299a) --- edgraph/server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/edgraph/server.go b/edgraph/server.go index 2d69077dbb5..7fb3803d432 100644 --- a/edgraph/server.go +++ b/edgraph/server.go @@ -350,6 +350,9 @@ func (s *Server) doMutate(ctx context.Context, qc *queryContext, resp *api.Respo if x.WorkerConfig.LudicrousMode { // Mutations are automatically committed in case of ludicrous mode, so we don't // need to manually commit. + if resp.Txn == nil { + return errors.Wrapf(err, "Txn Context is nil") + } resp.Txn.Keys = resp.Txn.Keys[:0] resp.Txn.CommitTs = qc.req.StartTs return err