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

fix(Ludicrous): Upserts on list type in Dgraph #6754

Merged
merged 4 commits into from
Oct 19, 2020

Conversation

rahulgurnani
Copy link
Contributor

@rahulgurnani rahulgurnani commented Oct 19, 2020

Fixes DGRAPH-2446

We were not updating startTs for upsert mutations properly in ludicrous mode.


This change is Reviewable

@github-actions github-actions bot added the area/testing Testing related issues label Oct 19, 2020
@rahulgurnani rahulgurnani added the area/mutations Related to mutations JSON or RDF. label Oct 19, 2020
Copy link
Contributor

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments. Good work @rahulgurnani . This was a hairy bug!

}

func TestSequentialUpdate(t *testing.T) {
t.Log("TestSequentialUpdate")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this please.

require.NoError(t, err)
schema := `
name: string @index(exact) .
email: string @index(exact) .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove the email. It seems like we're not using it anywhere.

systest/ludicrous/upsert_test.go Show resolved Hide resolved
@@ -0,0 +1,152 @@
package worker
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be main. Also, the license is missing.

wg.Add(count)
mutation := func(i int) {
defer wg.Done()
query := fmt.Sprintf(`query {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

query := .... would also work. You don't need the fmt.Sprintf

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

@rahulgurnani rahulgurnani force-pushed the rahulgurnani/ludicrous_fixes branch from 682b57b to b2104bf Compare October 19, 2020 11:33
@rahulgurnani rahulgurnani removed the area/testing Testing related issues label Oct 19, 2020
@rahulgurnani rahulgurnani force-pushed the rahulgurnani/ludicrous_fixes branch from bbc0784 to f74c9d7 Compare October 19, 2020 15:22
@rahulgurnani rahulgurnani merged commit 241128f into master Oct 19, 2020
rahulgurnani added a commit that referenced this pull request Oct 23, 2020
* Fix DGRAPH-2446: Dgraph missing upserts in ludicrous mode

* Add tests

* Address review comments

* Add a space
rahulgurnani added a commit that referenced this pull request Oct 23, 2020
* Fix DGRAPH-2446: Dgraph missing upserts in ludicrous mode

* Add tests

* Address review comments

* Add a space
rahulgurnani added a commit that referenced this pull request Oct 23, 2020
* Fix DGRAPH-2446: Dgraph missing upserts in ludicrous mode

* Add tests

* Address review comments

* Add a space
danielmai pushed a commit that referenced this pull request Oct 23, 2020
Cherry-pick of the following into release/v20.07:
* fix(Ludicrous): Upserts on list type in Dgraph (#6754)
* fix(test): Add sleep before running ludicrous mode tests (#6766)

Fixes DGRAPH-2446.
Post mortem of issue: https://discuss.dgraph.io/t/dgraph-missing-mutations-in-ludicrous-mode-post-mortem/11019
rahulgurnani added a commit that referenced this pull request Nov 2, 2020
* Fix DGRAPH-2446: Dgraph missing upserts in ludicrous mode

* Add tests

* Address review comments

* Add a space
rahulgurnani added a commit that referenced this pull request Nov 3, 2020
* fix(Ludicrous): Upserts on list type in Dgraph (#6754)

* Fix DGRAPH-2446: Dgraph missing upserts in ludicrous mode

* Add tests

* Address review comments

* Add a space

* fix(test): Add sleep before running ludicrous mode tests (#6766)

* Add sleep before running the tests

* Fix the assert in tests

* Wait for eventual consistency

* fix(test): Use dgo/v2 in test for release/v20.03.

dgo/v200 is used in release/v20.07 and later.

* Add sleep post mutation

* Experiment with more sleep

Co-authored-by: Daniel Mai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/mutations Related to mutations JSON or RDF.
Development

Successfully merging this pull request may close these issues.

2 participants