-
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(worker): Flush the stream writer on error (DGRAPH-2499) #6609
Conversation
worker/snapshot.go
Outdated
return | ||
} | ||
// Flush the writer if it has not been flushed so that we can unblock the writes. | ||
if err := writer.Flush(); err != nil { |
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.
We could add a cancel API on stream writer to fix this in a more elegant way.
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.
@ajeetdsouza is working on resolving this.
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 1 files reviewed, 1 unresolved discussion (waiting on @jarifibrahim, @manishrjain, and @vvbalaji-dgraph)
worker/snapshot.go, line 82 at r1 (raw file):
Previously, jarifibrahim (Ibrahim Jarif) wrote…
We could add a cancel API on stream writer to fix this in a more elegant way.
Add a Cancel API as you suggested.
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.
Whenever you fix it, you can merge it.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @jarifibrahim and @vvbalaji-dgraph)
Closing this PR since we don't need it anymore. |
The stream write blocks writes to badger and if we don't call
writer.flush
we will never unblock the writesThis change is
Docs Preview: