-
Notifications
You must be signed in to change notification settings - Fork 14
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
get_partial / set_partial / size: int or int64 #32
Comments
maybe worth using https://github.com/mirage/optint/ to avoid boxing? and 63 bit are sufficient... |
I think for offset it makes sense to use int64, but for length I think int is fine since we can't make strings that are longer than what can fit in int. |
And now I wonder what get should do if the content is so large it can't fit in a string..! |
with get_partial / set_partial we write and read only chunks of the data --> that should be fine ;) |
CHANGES: * Use ptime directly for RO.last_modified, instead of the int * int64 pair (mirage/mirage-kv#34) * Add RW.allocate to allocate a key and fill it with zero bytes (mirage/mirage-kv#34) * RO.list: return Key.t instead of string (mirage/mirage-kv#37, fixes mirage/mirage-kv#33) * Introduce a custom error for RW.rename with a source which is a prefix of destination (mirage/mirage-kv#37, fixes mirage/mirage-kv#31) * Use Optint.Int63.t for RO.size, RO.get_partial, RO.set_partial (mirage/mirage-kv#37, fixes mirage/mirage-kv#32) * Remove RW.batch (mirage/mirage-kv#37, fixes mirage/mirage-kv#29 mirage/mirage-kv#36, discussed at the MirageOS meeting in November, and on the mirageos-devel mailing list in January 2022) * Key.pp: escape the entire string, not individual fragments (mirage/mirage-kv#35)
While working on implementations, I'm curious whether
length
andoffset
inget_partial
,offset
inset_partial
, and the return value ofsize
should better beint64
-- to enable safely reading and writing big data on 32bit systems as well (where int is pretty small).//cc @palinp any preferences to use int (or was it mainly that you're on 64 bit systems anyways)?
The text was updated successfully, but these errors were encountered: