Skip to content

(release/v1.6) Restore: Account for value size as well (#1358)#1504

Merged
NamanJain8 merged 2 commits intorelease/v1.6from
naman/cp-6
Sep 9, 2020
Merged

(release/v1.6) Restore: Account for value size as well (#1358)#1504
NamanJain8 merged 2 commits intorelease/v1.6from
naman/cp-6

Conversation

@NamanJain8
Copy link
Copy Markdown
Contributor

@NamanJain8 NamanJain8 commented Sep 8, 2020

In the existing code, when performing a restore, we didn't consider the size of the
value. This means badger would consume a lot of memory if the data consisted of
small keys and large values. This PR fixes the issue by forcefully flushing the
buffer if it grows beyond 100 MB.

(cherry picked from commit b2267c2)


This change is Reviewable

In the existing code, when performing a restore, we didn't consider the size of the
value. This means badger would consume a lot of memory if the data consisted of
small keys and large values. This PR fixes the issue by forcefully flushing the
buffer if it grows beyond 100 MB.

(cherry picked from commit b2267c2)
@NamanJain8 NamanJain8 requested a review from a team September 8, 2020 08:34
@NamanJain8 NamanJain8 changed the title Restore: Account for value size as well (#1358) (release/v1.6) Restore: Account for value size as well (#1358) Sep 8, 2020
Copy link
Copy Markdown
Contributor

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @ashish-goswami, @jarifibrahim, and @manishrjain)

@NamanJain8 NamanJain8 merged commit 3786a48 into release/v1.6 Sep 9, 2020
@NamanJain8 NamanJain8 deleted the naman/cp-6 branch September 9, 2020 12:15
mYmNeo pushed a commit to mYmNeo/badger that referenced this pull request Jan 16, 2023
)

In the existing code, when performing a restore, we didn't consider the size of the
value. This means badger would consume a lot of memory if the data consisted of
small keys and large values. This PR fixes the issue by forcefully flushing the
buffer if it grows beyond 100 MB.

(cherry picked from commit b2267c2)

Co-authored-by: Ibrahim Jarif <ibrahim@dgraph.io>
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