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

chore: Merge release/v20.07 to release/v20.07-slash #6536

Merged
merged 71 commits into from
Sep 21, 2020

Conversation

abhimanyusinghgaur
Copy link
Contributor

@abhimanyusinghgaur abhimanyusinghgaur commented Sep 21, 2020

Merge release/v20.07-slash with release/v20.07.


This change is Reviewable

Docs Preview: Dgraph Preview

NamanJain8 and others added 30 commits August 19, 2020 12:35
…6239)

* Fix URL paths (#6189)

(cherry picked from commit 4ee4af8)

* fix deploy page to not show blank page

(cherry picked from commit 89e012b)

Co-authored-by: Apoorv Vardhan <vardhanapoorv@users.noreply.github.com>
* Port GraphQL docs to v20.07

This reverts commit 8db61a3.

Co-authored-by: Pawan Rawal <pawan0201@gmail.com>
Co-authored-by: Sankalan Parajuli <sankalan.13@gmail.com>
…6259)

This change also adds a way to set the table and value log loading modes for the w directory
independently of the values for the p directory.

Fixes DGRAPH-1898.

(cherry picked from commit 5f5aa9c)
…6272) (#6276)

Currently a node is marked as visited if it's been visited before AND
has been visited from the same source UID. In dense graphs, the second
condition leads to exponential growth of the data and to other issues
such as responses that are too big to encode.  Removing this condition
fixes the issue.

Fixed tests and verified the new output makes sense.

Fixes DGRAPH-2337

(cherry picked from commit 3638c12)
)

This was being done in the S3 handler but not in the file handler.
By default the paths are sorted by the filename but sorting by backup
number is more robust.

(cherry picked from commit df63d6c)
Clear out the start_ts field in the postings of deltas before they are
marshalled to avoid storing that field in disk. This field is only meant
to be used during in-memory processing.

Related to https://discuss.dgraph.io/t/start-ts-not-being-cleared-before-postings-are-written-to-disk/9146

(cherry picked from commit fbbd731)
Fixes DGRAPH-2181

The queries in dgraph are processed in separate goroutines. The pstore badger DB
could be closed while the query was being processed. This causes panics such as
```
panic: runtime error: invalid memory address or nil pointer dereference
	panic: Unclosed iterator at time of Txn.Discard.
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x11d2311]

goroutine 19298 [running]:
github.com/dgraph-io/badger/v2.(*Txn).Discard(0xc05586bc20)
	/go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20200718033852-37ee16d8ad1c/txn.go:517 +0xc1
panic(0x19e26a0, 0x2988560)
	/usr/local/go/src/runtime/panic.go:969 +0x166
github.com/dgraph-io/badger/v2/skl.(*Skiplist).IncrRef(...)
```
This PR attempts to reduce the number of such crashes. This PR doesn't fix the actual
issue but it tries to reduce the probability of such crashes by checking if badger is not
closed before accessing it.

An ideal fix would be to stop all the goroutines started by dgraph while closing DB so
that we don't try to read from a closed badger DB.

(cherry picked from commit 3cea0fe)
Backups should be added to the list of tasks (rollups, snapshots, etc)
that are managed by Dgraph so that rollups and other tasks are paused
during the backup.

(cherry picked from commit ea15b66)
This badger update brings the following changes from badger.

https://github.com/dgraph-io/badger/commits/b41e77a Fix(cleanup): Avoid truncating in value.Open on error
https://github.com/dgraph-io/badger/commits/a0d4903 fix(cleanup): Do not close cache before compaction
(cherry picked from commit deded8b)
(cherry picked from commit a8a6e85)

Co-authored-by: Tejas Dinkar <tejas@gja.in>
…quest at a time. (#6339)

It's possible that two requests reach the server around the same time
and send a requests to the alphas with the same backupNum. This could
lead to issues further down the line.

Related to DGRAPH-2295

(cherry picked from commit 5b79260)
… mode for zero. (#6342)

Related to DGRAPH-2189

(cherry picked from commit bf79999)
(cherry picked from commit 844f34d)
Fixes DGRAPH-2357.
Fixes GRAPHQL-562.

(cherry picked from commit 91e28d5)
…#6352)

Fixes DGRAPH-2356
This PR fixes random GraphQL custom logic e2e test failures in TeamCity by requiring docker-compose to always build images before starting the containers, as the mock server in custom logic tests can change any time.

(cherry picked from commit 536b317)
…GQLSchema (#6349) (#6354)

* fix(GraphQL): incorrect generatedSchema in updateGQLSchema (#6349)

This PR fixes the behaviour where Dgraph schema was being given as generatedSchema field in updateGQLSchema request. Now, the newly generated complete GraphQL schema is given as generatedSchema.

(cherry picked from commit 0b8681c)

# Conflicts:
#	graphql/e2e/schema/schema_test.go
minhaj-shakeel and others added 11 commits September 21, 2020 12:21
) (#6417)

Fixes GRAPHQL-655.

For this user schema (interface have no non-Id field):

```
interface A {
   name: String! @id
}

type B implements A {
  age: Int!
}
```
the following delete mutation
```
mutation{
  deleteA(filter:{name:{eq: "xyz"}}){
    a{
      name
    }
  }
}
```
was resulting in the following error:
```
{
  "errors": [
    {
      "message": "Internal Server Error - a panic was trapped.  This indicates a bug in the GraphQL server.  A stack trace was logged.  Please let us know by filing an issue with the stack trace."
    }
  ]
}
```
This PR fixes this bug and now deleting can be performed successfully.

(cherry picked from commit 742259b)
…6424)

Fixes GRAPHQL-642.

For this restoreStatus query using variable
```
query restoreStatus($restoreId: Int!) {
	restoreStatus(restoreId: $restoreId) {
		status
		errors
	}
}
```
was giving this panic
```
panic: interface conversion: interface {} is json.Number, not int64.
```
Whereas the expected result should be
```
{
  "data": {
    "restoreStatus": {
      "status": "UNKNOWN",
      "errors": []
    }
  },
  "extensions": {}
}
```
This PR fixes this panic, Now `resolveStatus` with or without variable works fine.

(cherry picked from commit 45afae9)
…6330) (#6522)

This PR fix errors from authorization examples given in docs.

(cherry picked from commit 0f3bfb1)
* Fix(GraphQL): This PR add schema cleaning in GraphQL. (#6427)

Fixes GRAPHQL-572

This PR adds schema cleaning in GraphQL which will remove empty links and types from generated GraphQL schema recursively.

(cherry picked from commit bec5322)
…ed (#6416) (#6530)

While creating the add mutation, we weren't squashing different bits correctly which led to the incorrect mutation being sent to Dgraph. This change modifies the set to append for []interface{} to fix that.

Fixes GRAPHQL-679

(cherry picked from commit 816a08f)

# Conflicts:
#	graphql/e2e/common/mutation.go
#	graphql/e2e/directives/schema.graphql
#	graphql/e2e/normal/schema.graphql
#	graphql/resolve/schema.graphql
…6535)

* fix(GraphQL): Fix cascade with auth query when RBAC is false (#6444)

* Fix cascade with auth query.

* Added additional E2E test.

(cherry picked from commit 8c518d4)
…h rule. (#6391) (#6534)

* fix(GraphQL): Hide info when performing mutation on id field with auth rule. (#6391)

* Hide info when performing mutation on id field with auth rule.

(cherry picked from commit 5c33428)
…imanyu/release-slash-merge

# Conflicts:
#	dgraph/cmd/alpha/run.go
#	edgraph/server.go
#	go.mod
#	go.sum
#	graphql/e2e/common/common.go
#	graphql/e2e/common/mutation.go
#	graphql/e2e/directives/schema.graphql
#	graphql/e2e/directives/schema_response.json
#	graphql/e2e/normal/schema.graphql
#	graphql/e2e/normal/schema_response.json
#	graphql/e2e/schema/generatedSchema.graphql
#	graphql/e2e/schema/schema_test.go
#	graphql/resolve/schema.graphql
#	graphql/schema/wrappers.go
#	protos/pb/pb.pb.go
@CLAassistant
Copy link

CLAassistant commented Sep 21, 2020

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added area/bulk-loader Issues related to bulk loading. area/enterprise Related to proprietary features area/documentation Documentation related issues. area/graphql Issues related to GraphQL support on Dgraph. area/integrations Related to integrations with other projects. area/querylang Issues related to the query language specification and implementation. labels Sep 21, 2020
@abhimanyusinghgaur abhimanyusinghgaur changed the title Abhimanyu/release slash merge chore: Merge release/v20.07 to release/v20.07-slash Sep 21, 2020
@Sankalan13 Sankalan13 merged commit 567afc5 into release/v20.07-slash Sep 21, 2020
@abhimanyusinghgaur abhimanyusinghgaur deleted the abhimanyu/release-slash-merge branch September 21, 2020 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/bulk-loader Issues related to bulk loading. area/documentation Documentation related issues. area/enterprise Related to proprietary features area/graphql Issues related to GraphQL support on Dgraph. area/integrations Related to integrations with other projects. area/querylang Issues related to the query language specification and implementation.
Development

Successfully merging this pull request may close these issues.