What is the difference between the various ZODB blobstorage layouts?

我是研究僧i 提交于 2019-11-28 04:11:41

问题


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

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


回答1:


It is explained here: http://svn.zope.org/ZODB/trunk/src/ZODB/tests/blob_layout.txt?rev=101802&view=markup

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.




回答2:


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.



来源:https://stackoverflow.com/questions/4866646/what-is-the-difference-between-the-various-zodb-blobstorage-layouts

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!