RE: mas.to/@zekjur/116022397626943

Just yesterday I discussed a feature of @couchdbApache CouchDB’s storage engine:

CouchDB allows you to store binary data as document attachments.

Opening a database file happens by reading backwards from its end until we find a valid footer.

What if you attach a database file? How can we distinguish a genuine footer from an attachment footer?

Easy, attachment data is written in 4k blocks with a null byte in between, which breaks footer validation.

One downside: we cannot sendfile(2) attachments.

0

If you have a fediverse account, you can quote this note from your own instance. Search https://narrativ.es/users/janl/statuses/116023398662310347 on your instance and quote it. (Note that quoting is not supported in Mastodon.)