-
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(raftwal): Pass the encryption key instead of reading from WorkerConfig #7013
Conversation
Deploy preview for dgraph-docs ready! Built with commit e4d34ae |
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.
What if we had a func called InitEncrypted(dir string, encKey x.SensitiveByteSlice) *DiskStorage
alongside the Init
func? That way the change isn't as invasive as adding nil
everywhere for Init(dir, nil)
. And, given that all the error checks just panic/stop anyway if raftwal isn't init'd when returning an error value, is returning an error helpful?
Reviewable status: 0 of 10 files reviewed, all discussions resolved (waiting on @manishrjain and @vvbalaji-dgraph)
Yes, having |
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.
Remove the return parameter from InitEncrypted
function and this PR should be good to merge.
We should not read the encryption key from the worker config, rather we can pass it as an argument to the Init() method which initializes the diskStorage for the raftwal.
This change is