Skip to content

Move mutations out #1631

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

Closed
wants to merge 6 commits into from
Closed

Move mutations out #1631

wants to merge 6 commits into from

Conversation

manishrjain
Copy link
Contributor

@manishrjain manishrjain commented Oct 12, 2017

  • Query no longer contains mutations. This means:
    • No more query vars can be used in mutations.
    • No more upserts. They will be done via transactions.
    • Gql doesn't need to parse for mutations or schema mutations.
  • Add a new endpoint called Mutate, just for mutations.
  • Remove http endpoint /query. All read-write ops must be done via a grpc client.

This change is Reviewable

@pawanrawal
Copy link
Contributor

:lgtm:

Apart from this a lot of upsert code can be removed from worker/scheduler.go too. Once you merge I can remove that, should be quicker that way.


Review status: 0 of 16 files reviewed at latest revision, 2 unresolved discussions.


dgraph/server.go, line 215 at r1 (raw file):

		Str:       req.Query,
		Variables: req.Vars,
		Http:      false,

this flag can be removed as well as http is always false now. Maybe add a TODO for later.


dgraph/server.go, line 341 at r1 (raw file):

		}

		// TODO: Sort the facets by key.

We saw that this is being done later, so TODO can be removed.


Comments from Reviewable

@manishrjain
Copy link
Contributor Author

Awesome. Will let you delete the upsert code in the scheduler.


Review status: 0 of 16 files reviewed at latest revision, 2 unresolved discussions.


dgraph/server.go, line 215 at r1 (raw file):

Previously, pawanrawal (Pawan Rawal) wrote…

this flag can be removed as well as http is always false now. Maybe add a TODO for later.

Done. Added a TODO for now.


dgraph/server.go, line 341 at r1 (raw file):

Previously, pawanrawal (Pawan Rawal) wrote…

We saw that this is being done later, so TODO can be removed.

Done.


Comments from Reviewable

@manishrjain
Copy link
Contributor Author

Pushed to master at 06d576b. This would break tests and would make the code unstable for a bit while we're working on transactions and making major changes throughout the code base.

@manishrjain manishrjain deleted the mrjn/txn1 branch October 13, 2017 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants