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(live): fix live loader to load with force namespace #7445

Merged
merged 20 commits into from
Feb 18, 2021

Conversation

NamanJain8
Copy link
Contributor

@NamanJain8 NamanJain8 commented Feb 17, 2021

This PR fixes the live loader for loading data using force-namespace flag.
Earlier, the schema alteration was not following the passed flag.


This change is Reviewable

@github-actions github-actions bot added the area/live-loader Issues related to live loading. label Feb 17, 2021
Copy link
Contributor Author

@NamanJain8 NamanJain8 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @manishrjain and @vvbalaji-dgraph)


dgraph/cmd/live/run.go, line 680 at r1 (raw file):

		// will be galaxy-wide.
		ctx = x.AttachGalaxyOperation(ctx, opt.namespaceToLoad)
		// We don't support upsert predicate while loading data in multiple namespace.

Add a test for this change.

@@ -284,6 +284,18 @@ func IsGalaxyOperation(ctx context.Context) bool {
return len(ns) > 0 && (ns[0] == "true" || ns[0] == "True")
}

func GetForceNamespace(ctx context.Context) string {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need to go into x?

@NamanJain8 NamanJain8 merged commit e2d7bb8 into master Feb 18, 2021
@NamanJain8 NamanJain8 deleted the naman/multitenancy/fix-live branch February 18, 2021 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/live-loader Issues related to live loading.
Development

Successfully merging this pull request may close these issues.

None yet

3 participants