Is there a maximum length for the key and/or value ByteIterable
in Xodus? If there is a hard limit, what is that limit (i.e. how many bytes)? And what will happen if a ByteIterable
exceeds that limit?
Xodus is a log-structured database, all changes are written sequentially to a log, which is an infinite sequence of .xd files. On the lowest level, any key/value pair is written as a single record which can only exist in a single .xd file. That means that the sum of sizes of key and value can't exceed the size of single .xd file. Even more, it's not good to store key/value pairs of size close to the size of single .xd file since this would create a database with much unmovable (by means of the database garbage collector) free space. An attempt to write too big key/value pair would fail with TooBigLoggableException
thrown.
The size of single .xd file is controlled by the EnvironmentConfig.LOG_FILE_SIZE
setting. It's 8388608 bytes (0x800000, 8MiB) by default, so the answer to the question is like the maximum length of key and value is 8388608 (0x800000) bytes.
To deal with data of arbitrary size, use Virtual File Systems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With