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
Script to fix part list not found error #8857
base: ahsan/philips-dev
Are you sure you want to change the base?
Conversation
"github.com/dgraph-io/dgraph/protos/pb" | ||
"github.com/dgraph-io/dgraph/x" | ||
humanize "github.com/dustin/go-humanize" | ||
"github.com/spf13/cobra" |
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.
fix imports
password string | ||
} | ||
|
||
const ( |
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 should just use these from x/keys.go instead of copying it
./script repair --dir=<path of the p directory> --enc-key=<paste the encryption key here, or `cat encryptionfile`> --lookup=000000000000000000000962656c6f6e6773546f0000000000009f1e2b --getOldData --repair=true | ||
``` | ||
|
||
Sometimes, if the alpha was not killed cleanly, the VLOG (value log) might be left open. To fix this issue, you can use --truncate=true --read-only=true. Only use this if the VLOG was left open and avoid using it if the memtable was left open as it may cause data loss. |
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.
why is it that read-only=true and truncate=true options are used together?
@@ -0,0 +1,51 @@ | |||
# Key Not Found Error Fix Tool | |||
|
|||
This tool is used to fix the "Key not found" error in a dgraph cluster. The tool has two subcommands: ./script scan and ./script repair. |
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.
line width should be limited by 100/120 chars throughout the file
--dir: Path of the P directory. | ||
--enc-key: Encryption key in plaintext. | ||
--lookup: The key that needs to be repaired. If you run ./script scan, it will parse out the key and provide it in the command. | ||
--getOldData: Used to specify that you want to repair the "Key not found" issue. |
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.
--getOldData for repairing the data?
@@ -0,0 +1,971 @@ | |||
/* |
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.
let's use a folder name other than script
@@ -0,0 +1,971 @@ | |||
/* | |||
* Copyright 2017 Dgraph Labs, Inc. and Contributors |
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.
2023
Problem
Solution