Skip to content
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

Open
wants to merge 10 commits into
base: ahsan/philips-dev
Choose a base branch
from

Conversation

harshil-goel
Copy link
Contributor

Problem

Solution

"github.com/dgraph-io/dgraph/protos/pb"
"github.com/dgraph-io/dgraph/x"
humanize "github.com/dustin/go-humanize"
"github.com/spf13/cobra"
Copy link
Contributor

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 (
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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 @@
/*
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2023

@harshil-goel harshil-goel changed the title Harshil goel/phillips fix Script to fix part list not found error Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants