各种ZODB blobstorage布局之间有什么区别?

2024-06-26 02:31:00 发布

您现在位置:Python中文网/ 问答频道 /正文

ZODB blobstorage目录包含一个.layout文件,其字符串为“lawn”、“bushy”。在

各种blob存储目录格式之间有什么区别?在


Tags: 文件字符串目录格式blobzodblayout区别
2条回答

解释如下:http://svn.zope.org/ZODB/trunk/src/ZODB/tests/blob_layout.txt?rev=101802&view=markup

自由贸易协定:

======================

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.

它还详细解释了格式。在

通常不需要担心布局;lawn只是为了向后兼容。在

如果您确实有一个lawn布局blobstorage(如果有,日志中会出现警告),并希望迁移到bushy布局,请使用migrateblobs脚本;下面是创建脚本的构建部分:

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

关闭所有实例和ZEO服务器,备份blob存储并在blobstorage目录上运行脚本:

^{pr2}$

var/blobstorage将使用bushy布局包含迁移的blob。在

相关问题 更多 >