liburkel icon indicating copy to clipboard operation
liburkel copied to clipboard

Increase max value size

Open chjj opened this issue 5 years ago • 2 comments

Values are currently capped at 1024 bytes. There are two reasons for this:

  1. We try to save as much space as possible on disk by compressing pointers and packing everything into bits. Only 10 bits are currently reserved for sizes.
  2. Having a max value size lends itself to a much simpler C api, where liburkel need not do any allocation and the user can simply stack allocate a 1024 byte array before a call.

This may be unacceptable for more generic uses of the urkel tree. If this were to change, we would need to:

  1. Write a migration for older databases.
  2. Make some breaking API changes.

chjj avatar Sep 25 '20 19:09 chjj

Yep, this'd be very useful - I was thinking about using it instead of our tiny home-grown key-value multiprocess & multithreading storage DB, but we have values of several megabytes in size quite regularly, so we can't switch to urkel.

dumblob avatar Nov 16 '21 16:11 dumblob

I would like to know how hard it is to change the value size to 4096 KB, to allow it storage SQLITE page data. (this will need 12 bits size)

calvin2021y avatar Aug 13 '22 13:08 calvin2021y