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

Add information about using "p" dir coming from other Dgraph clusters… #384

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MichelDiz
Copy link
Contributor

This pr explains how to properly use a p directory that is coming from a different cluster. This adds instruction on how to let Zero correctly manage the p directory by increasing the timestamp

…#138)

* added information about using p dirs coming from different Dgraph clusters

* typos

* Apply suggestions from code review

* Update content/deploy/fast-data-loading/bulk-loader.md

* Update content/deploy/fast-data-loading/bulk-loader.md

* Update content/deploy/fast-data-loading/bulk-loader.md

* Update content/deploy/fast-data-loading/bulk-loader.md

* Update content/deploy/fast-data-loading/bulk-loader.md

Co-authored-by: Damián Parrino <bucanero@users.noreply.github.com>
Co-authored-by: aaroncarey <31550444+aaroncarey@users.noreply.github.com>
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@netlify
Copy link

netlify bot commented Dec 15, 2022

Deploy Preview for dgraph-docs-repo ready!

Name Link
🔨 Latest commit e9e5a8d
🔍 Latest deploy log https://app.netlify.com/sites/dgraph-docs-repo/deploys/639a9613e302e200088d737a
😎 Deploy Preview https://deploy-preview-384--dgraph-docs-repo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@@ -272,6 +272,46 @@ I1227 13:27:53.959671 29781 draft.go:571] Creating snapshot at index: 34. Read
```
Note that `snapshot at index` value must be the same within the same Alpha group and `ReadTs` must be the same value within and among all the Alpha groups.

### Using "p" directories coming from different Dgraph clusters
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 limit the width of the line. It simplifies future diff etc.

After starting your Zero nodes, you need to increase the Zero's timestamp by sending the following `curl` request to the Zero leader node:

```
curl "zero_address:port/assign?what=timestamps&num=X" #with X = high number e.g. 100000 or higher
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure if having vague numbers is a good idea. Maybe @rderbier has an opinion here.

Now you need to confirm whether this timestamp has been increased as expected. You can do this by sending a `curl` request to the zero `/state` endpoint, as follows:

```
curl zero-address:port/state | jq
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 specify the port here.

```
curl zero-address:port/state | jq
```
At the end of the response, look for the value shown for `"maxTxnTs"`. This value should be greater than or equal to the timestamp you assigned in the previous `curl` request, as shown in the following example:
Copy link
Contributor

Choose a reason for hiding this comment

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

what do we do if timestamp is not greater?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I haven't thoroughly reviewed each cherry-picked change in the content; I only checked if they align with the main branch at a basic level. If you'd like to make any modifications, please feel free to push commits to the branch. Since this was a cherry-pick, I didn't have plans to work on the content myself. It was requested that I examine whether it could be incorporated into the main branch. Given that this is an older cherry-pick that was validated by the previous docs team, I don't see a reason to refactor their content. However, if you feel otherwise, go ahead and push your commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants