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

Storing values larger than (1 << 31) - 2 (2 GB) #656

Closed
mitar opened this issue Dec 31, 2023 · 4 comments
Closed

Storing values larger than (1 << 31) - 2 (2 GB) #656

mitar opened this issue Dec 31, 2023 · 4 comments

Comments

@mitar
Copy link

mitar commented Dec 31, 2023

Currently bbolt has a hard-coded limit on value size of 2 GB. Could this be increased or made configurable? It seems to me that this is just to support mmap on 32 bit systems and there is really no design limitation why not to support larger values?

On my system, I have:

$ grep -m1 "address sizes" /proc/cpuinfo 
address sizes	: 39 bits physical, 48 bits virtual

So a bit less than 2^47 (128 TiB) could be the max limit for mmap on my system.

@simon28082
Copy link

bbolt db use bucket, every bucket max 2G, badger only single max 2G, @mitar Did you find a better solution?

@ahrtr
Copy link
Member

ahrtr commented Jan 10, 2024

Storing too big value isn't efficient. AFAIK, other database system, e.g mysql, also have limitation on value size.

Do you have a real use case which needs to store a value bigger than 2GB?

@tjungblu
Copy link
Contributor

regardless of efficiency, wouldn't there be a limit in Golang's slice sizes? You'd have to store it in a []byte somehow. In which case you might want to shard it across several keys anyway.

@ahrtr
Copy link
Member

ahrtr commented Feb 3, 2024

There is no plan to support configuring the the max value size.

Please reopen this issue if you have a strong justification.

@ahrtr ahrtr closed this as completed Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants