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

perf(dgraph) - Use badger sinceTs in backups #7392

Merged
merged 11 commits into from
Feb 9, 2021
Merged

Conversation

jarifibrahim
Copy link
Contributor

@jarifibrahim jarifibrahim commented Feb 3, 2021

This PR improves incremental backups.
We set the sinceTs in the stream framework to skip data that is below the sinceTs. Since the schema and type are written at timestamp 1, we need to separately process and store them.

Time taken to backup 21 million -> 1.11 minutes
Time taken to create an incremental backup with 2 new nquads
Master - 5.8 seconds
This PR - 1 second

Fixes DGRAPH-2958


This change is Reviewable

@jarifibrahim jarifibrahim changed the title Use badger sinceTs in backups perf(dgraph) - Use badger sinceTs in backups Feb 4, 2021
@jarifibrahim jarifibrahim merged commit ec744ba into master Feb 9, 2021
@jarifibrahim jarifibrahim deleted the ibrahim/sinceTs branch February 9, 2021 08:09
jarifibrahim pushed a commit that referenced this pull request Feb 16, 2021
The recent change #7392 improved
the incremental backups but degraded the performance of full backups.
This PR fixes that.

With this PR, we use the thread local iterator only for the incremental
backups. Using the thread local iterator for full backups causes a 10x
slowdown in performance.
jarifibrahim pushed a commit that referenced this pull request Feb 18, 2021
The recent change #7392 improved
the incremental backups but degraded the performance of full backups.
This PR fixes that.

With this PR, we use the thread local iterator only for the incremental
backups. Using the thread local iterator for full backups causes a 10x
slowdown in performance.
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.

2 participants