fix(schema-update): Start opIndexing only when index creation is required.#7845
Merged
ahsanbarkati merged 5 commits intomasterfrom May 24, 2021
Merged
fix(schema-update): Start opIndexing only when index creation is required.#7845ahsanbarkati merged 5 commits intomasterfrom
ahsanbarkati merged 5 commits intomasterfrom
Conversation
NamanJain8
approved these changes
May 24, 2021
Contributor
NamanJain8
left a comment
There was a problem hiding this comment.
Minor commets. The rest looks good.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @ahsanbarkati, @manishrjain, and @vvbalaji-dgraph)
worker/mutation.go, line 250 at r1 (raw file):
// Start opIndexing task only if schema update needs to build the indexes. if ok && rebuild.NeedIndexRebuild() && !gr.Node.isRunningTask(opIndexing) {
rebuild.NeedIndexRebuild() is used twice. Let's calculate it once?
Also, we can combine shouldRebuild := ok && rebuild.NeedIndexRebuild()
ahsanbarkati
commented
May 24, 2021
Contributor
Author
ahsanbarkati
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @manishrjain, @NamanJain8, and @vvbalaji-dgraph)
worker/mutation.go, line 250 at r1 (raw file):
Previously, NamanJain8 (Naman Jain) wrote…
rebuild.NeedIndexRebuild()is used twice. Let's calculate it once?
Also, we can combineshouldRebuild := ok && rebuild.NeedIndexRebuild()
Done. Thanks
jarifibrahim
approved these changes
May 24, 2021
ahsanbarkati
added a commit
that referenced
this pull request
May 24, 2021
…ired. (#7845) We were starting opIndexing while schema update irrespective of whether index building is required or not. This caused Dgraph to be unable to create namespaces while backup is running, despite the fact that namespace creation doesn't need any indexing. This PR fixes this issue. (cherry picked from commit 5595f9c)
ahsanbarkati
added a commit
that referenced
this pull request
May 24, 2021
…ired. (#7845) We were starting opIndexing while schema update irrespective of whether index building is required or not. This caused Dgraph to be unable to create namespaces while backup is running, despite the fact that namespace creation doesn't need any indexing. This PR fixes this issue. (cherry picked from commit 5595f9c)
ahsanbarkati
added a commit
that referenced
this pull request
May 24, 2021
…ired. (#7845) (#7846) We were starting opIndexing while schema update irrespective of whether index building is required or not. This caused Dgraph to be unable to create namespaces while backup is running, despite the fact that namespace creation doesn't need any indexing. This PR fixes this issue. (cherry picked from commit 5595f9c)
ahsanbarkati
added a commit
that referenced
this pull request
May 24, 2021
…ired. (#7845) (#7847) We were starting opIndexing while schema update irrespective of whether index building is required or not. This caused Dgraph to be unable to create namespaces while backup is running, despite the fact that namespace creation doesn't need any indexing. This PR fixes this issue. (cherry picked from commit 5595f9c)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We were starting
opIndexingwhile schema update irrespective of whether index building is required or not.This caused Dgraph to be unable to create namespace while backup (or in fact any other conflicting task with opIndexing) is running.
This change is