-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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(schema-update): Start opIndexing only when index creation is required. #7845
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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()
There was a problem hiding this 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, @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
…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)
…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)
…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)
…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)
We were starting
opIndexing
while 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