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

Fix ValueThreshold for in-memory mode #1235

Merged
merged 1 commit into from
Mar 3, 2020

Conversation

jarifibrahim
Copy link
Contributor

@jarifibrahim jarifibrahim commented Mar 2, 2020

This commit increases the ValueThreshold for in-memory mode. The
existing threshold was of 1 MB which means badger would crash if
len(value) was greater than 1 MB. This commit sets the value threshold
to MaxInt32 (around 2 GB). Badger transactions would return an error if
badger is running in in-memory mode and length of the value is greater than
the value threshold.

Fixes #1234


This change is Reviewable

This commit increases the ValueThreshold for in-memory mode. The
existing threshold was of 1 MB which means badger would crash if
len(value) was greater than 1 MB. This commit sets the value threshold
to MaxInt32 (around 2 GB). Badger transaction would return error if
badger is running in in-memory mode and length of value is greater than
the value threshold.
@coveralls
Copy link

coveralls commented Mar 2, 2020

Coverage Status

Coverage decreased (-0.09%) to 69.729% when pulling 873cc15 on ibrahim/fix-valuethreshold into 617ed7c on master.

Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ashish-goswami)

@jarifibrahim jarifibrahim merged commit 5b4c0a6 into master Mar 3, 2020
@jarifibrahim jarifibrahim deleted the ibrahim/fix-valuethreshold branch March 3, 2020 08:03
jarifibrahim pushed a commit that referenced this pull request Mar 24, 2020
This commit increases the ValueThreshold for in-memory mode. The
existing threshold was of 1 MB which means badger would crash if
len(value) was greater than 1 MB. This commit sets the value threshold
to MaxInt32 (around 2 GB). Badger transaction would return an error if
badger is running in in-memory mode and length of value is greater than
the value threshold.

Fixes #1234

(cherry picked from commit 5b4c0a6)
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.

WithInMemory(true) panic: runtime error: index out of range [0] with length 0
4 participants