Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between the various ZODB blobstorage layouts?

Tags:

python

zope

zodb

The ZODB blobstorage directory contains a .layout file with the string 'lawn', 'bushy'.

What is the difference between the various blob storage directory formats?

like image 726
joeforker Avatar asked Feb 01 '11 18:02

joeforker


2 Answers

It is explained here: https://github.com/zopefoundation/ZODB/blob/master/src/ZODB/tests/blob_layout.txt

FTA:

====================== Blob directory layouts

The internal structure of the blob directories is governed by so called layouts. The current default layout is called bushy.

The original blob implementation used a layout that we now call lawn and which is still available for backwards compatibility.

Layouts implement two methods: one for computing a relative path for an OID and one for turning a relative path back into an OID.

Our terminology is roughly the same as used in DirectoryStorage.

It also explains the formats in detail.

like image 72
Please treat your mods well. Avatar answered Sep 22 '22 14:09

Please treat your mods well.


You generally don't need to worry about the layout; lawn is there only for backwards compatibility.

If you do have a lawn layout blobstorage (you'll get a warning in the log if you do) and want to migrate to a bushy layout, use the migrateblobs script; here is a buildout part to create the script:

[migrateblobs]
recipe = zc.recipe.egg
eggs = ZODB3
entry-points = migrateblobs=ZODB.scripts.migrateblobs:main

Shut down any instances and ZEO servers, back up your blob storage and run the script on your blobstorage directory:

$ mv var/blobstorage var/blobstorage-lawn
$ bin/migrateblobs var/blobstorage-lawn/ var/blobstorage

var/blobstorage will then contain the migrated blobs using the bushy layout.

like image 42
Martijn Pieters Avatar answered Sep 19 '22 14:09

Martijn Pieters