Libelektra: 缓存:kdb导出系统

创建于 2019-11-28  ·  29评论  ·  资料来源: ElektraInitiative/libelektra

在#3115中,我注意到kdb export system (在PR中kdb export system:/ )也会导出system/elektra/modules 。 这是故意的吗?

有关具体情况,请参见https://github.com/ElektraInitiative/libelektra/pull/3115#issuecomment -559576223

最有用的评论

AFAIK的此一个和下一个注释(即原始问题)仍未解决: https :

所有29条评论

当然,为什么不? 它还导出版本和其他对导入无用的内容。 您可以添加--without-elektra以避免导出这些部分。

对于shell记录器,我还希望仅备份和还原给定的部分。

当然,为什么不?

kdbSet是否以某种方式将其删除? 当通过插件get函数的特殊部分对它们进行硬编码时,序列化这些密钥似乎是错误的...

对于版本信息,kdbSet检查它们是否相同,如果相同,则忽略kdbSet。 否则会产生错误。

对于模块(iirc),没有kdbSet,因此只需忽略要设置的键。 Iirc的“常量”插件具有相同的行为,它通常安装在system / info / elektra中,因此不在system / elektra中。 也许我们应该更改它以使--without-elektra更加有用?

但是无论如何:两种行为(忽略和检查相同的键)都不应损害导入。

因此,对于目前非常不稳定的Elektra而言,这是很合理的:除非版本相同,否则系统/ elektra的导入将被拒绝。 为避免此错误,可以传递--without-elektra

在1.0之后,我们实际上可以放宽一点,接受Elektra 1.0或更高版本的导入。 ( @mpranj您怎么看?)

然后需要对文本进行修改,当前为:

kdb import system < sys
Sorry, module kdb issued the error C01320:
Interface: Read only plugin, 'kdbSet' not supported but the key system/elektra/version/constants/KDB_VERSION_MICRO (expected system/elektra/version/constants/KDB_VERSION_MICRO) was tried to be modified to '1' (expected '2')

无论如何,您的问题可以使我们了解如何改进--without-elektra的文档。 在导入/导出上下文中, --without-elektra的想法是:

  1. Elektra的所有内部元素都已导出,但是我们还进行了版本检查,以免混淆Elektra。
  2. 您无需导入/导出Elektra的内部,因此Elektra的版本无关紧要(只有存储插件的版本才重要)

在1.0之后,我们实际上可以更加放松

我同意这些建议。

就像@kodebach提到的那样,它刚刚出现在#3115中却从未出现过,这--without-elektra可能应该首先放在那里进行备份和还原,但看来PR还是改变了某些行为。

@kodebach您是否再次为那些测试激活了缓存? 我想等待PR的其余部分完成,以便我可以修复mmapstorage和缓存。 我已经看到这样/类似的错误( Postcondition of backend was violated: drop key [...] not belonging to [...] ),而缓存未正确实现。

您是否再次为那些测试激活了缓存?

是的,缓存已完全启用。

这样我就可以修复mmapstorage和缓存

mmapstorage已经可以使用。 原来我在某处有key而不是ukey

除了全局卸载测试的问题外,缓存似乎也可以正常工作。 最后我检查了一下,如果不编译缓存,就不会发生该错误。

我确实更改了kdbGetelektraCacheGet和相关功能的部分。 可能是我弄坏了一些东西,但是由于我更改的内容可能必须在#2969之后重新进行更改,所以我认为您现在不需要看一下。

好的。 我建议,如果cache + mmapstorage引起问题,您只需将其停用直到最后,然后我们激活即可对其进行调整。

PR是一个非常根本的更改,因此,如果由于某些损坏的缓存行为而不会卡住,它将更加容易。 基本准备就绪后,只需再次激活缓存并ping我即可,以便我查看一下并修复其余部分。

@mpranj :我已分配给您,因为这与缓存有关。

我无法在当前的母版上复制任何类似内容。 除非有人知道如何在此复制,否则我在那里不能做很多事情,但是我怀疑它不在母版上。

在#3115的分支上,我得到了所描述的错误。 @kodebach我应该去那里尝试根据更改来修复与缓存相关的内容吗?还是现在进行该工作还为时过早? 当前从master重新分支分支(后端后端插件)有多少痛苦?

我认为在#2969和相关PR合并之前,不值得在#3115上工作。 之后,我将重新设置基准并尝试完成PR。 我想尽可能地减少基准,因为您基本上必须检查所有提交,以确保所有依赖于键名语法的内容都可以确保适当的基准。

如果需要,您当然可以在当前版本的PR中查找错误。 但是,据我所记得,在创建问题之前,我曾在master上尝试过此操作,因此在此期间它可能已得到修复。

我认为在#2969和相关PR合并之前,不值得在#3115上工作。

好的谢谢! 然后让我们等待,并在相关PR合并后检查此问题!

是否有可能以某种方式标记问题,他们正在等待某些PR? 我现在更改了标题。

实际上,我今天设法在master上重现了这一点。 具体来说,我构建了scripts/docker/fedora/32/Dockerfile (技术上是从#3447而不是从master ,但是文件是相同的,并且完全独立)。 然后,我开始了一个容器

docker run -it -w /home/jenkins elektra-fedora-32:latest

并且在容器内运行以下行:

git clone https://github.com/ElektraInitiative/libelektra
cd libelektra && mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DKDB_DB_SPEC="$PWD/config/spec" -DKDB_DB_SYSTEM="$PWD/config/system" -DKDB_DB_USER="cdbg-1/.config" -DCMAKE_INSTALL_PREFIX="$PWD/install" -DINSTALL_SYSTEM_FILES=OFF -DENABLE_DEBUG=ON -DENABLE_LOGGER=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE -DPLUGINS="ALL;-lua;-ccode;-tcl" -DBINDINGS="ALL" -DCOMMON_FLAGS="-Werror"
make -j 24
bin/kdb export system toml

最后一条命令的输出为:

elektra.modules.cache = "cache plugin waits for your orders"
elektra.modules.cache.exports = ""
elektra.modules.cache.exports.close = "(binary)"
elektra.modules.cache.exports.get = "(binary)"
elektra.modules.cache.exports.open = "(binary)"
elektra.modules.cache.exports.set = "(binary)"
elektra.modules.cache.infos = "Information about the cache plugin is in keys below"
elektra.modules.cache.infos.author = "Mihael Pranjic <[email protected]>"
elektra.modules.cache.infos.licence = "BSD"
elektra.modules.cache.infos.metadata = ""
elektra.modules.cache.infos.needs = ""
elektra.modules.cache.infos.placements = "pregetcache postgetcache"
elektra.modules.cache.infos.provides = ""
elektra.modules.cache.infos.recommends = ""
elektra.modules.cache.infos.status = "maintained unittest shelltest specific global"
elektra.modules.cache.infos.version = 1
elektra.modules.dump = "dump plugin waits for your orders"
elektra.modules.dump.config.needs.fcrypt.textmode = 0
elektra.modules.dump.exports = ""
elektra.modules.dump.exports.get = "(binary)"
elektra.modules.dump.exports.serialise = "(binary)"
elektra.modules.dump.exports.set = "(binary)"
elektra.modules.dump.exports.unserialise = "(binary)"
elektra.modules.dump.infos = "Information about the dump plugin is in keys below"
elektra.modules.dump.infos.author = "Markus Raab <[email protected]>"
elektra.modules.dump.infos.licence = "BSD"
elektra.modules.dump.infos.metadata = ""
elektra.modules.dump.infos.needs = ""
elektra.modules.dump.infos.placements = "getstorage setstorage"
elektra.modules.dump.infos.provides = "storage/dump storage dump"
elektra.modules.dump.infos.recommends = ""
elektra.modules.dump.infos.status = "productive maintained conformant unittest tested nodep -1000 default"
elektra.modules.dump.infos.version = 1
elektra.modules.list = "list plugin waits for your orders"
elektra.modules.list.exports = ""
elektra.modules.list.exports.addPlugin = "(binary)"
elektra.modules.list.exports.close = "(binary)"
elektra.modules.list.exports.deferredCall = "(binary)"
elektra.modules.list.exports.editPlugin = "(binary)"
elektra.modules.list.exports.error = "(binary)"
elektra.modules.list.exports.findplugin = "(binary)"
elektra.modules.list.exports.get = "(binary)"
elektra.modules.list.exports.mountplugin = "(binary)"
elektra.modules.list.exports.open = "(binary)"
elektra.modules.list.exports.set = "(binary)"
elektra.modules.list.exports.unmountplugin = "(binary)"
elektra.modules.list.infos = "Information about the list plugin is in keys below"
elektra.modules.list.infos.author = "Thomas Waser <[email protected]>"
elektra.modules.list.infos.licence = "BSD"
elektra.modules.list.infos.needs = ""
elektra.modules.list.infos.placements = "pregetstorage procgetstorage postgetstorage postgetcleanup presetstorage presetcleanup precommit postcommit prerollback postrollback"
elektra.modules.list.infos.provides = ""
elektra.modules.list.infos.status = "unittest nodep libc configurable global"
elektra.modules.list.infos.version = 1
elektra.modules.resolver_fm_hpu_b = "resolver_fm_hpu_b plugin waits for your orders"
elektra.modules.resolver_fm_hpu_b.constants = ""
elektra.modules.resolver_fm_hpu_b.constants.ELEKTRA_VARIANT_BASE = "fm"
elektra.modules.resolver_fm_hpu_b.constants.ELEKTRA_VARIANT_SYSTEM = "b"
elektra.modules.resolver_fm_hpu_b.constants.ELEKTRA_VARIANT_USER = "hpu"
elektra.modules.resolver_fm_hpu_b.constants.KDB_DB_DIR = ".dir"
elektra.modules.resolver_fm_hpu_b.constants.KDB_DB_HOME = "/home"
elektra.modules.resolver_fm_hpu_b.constants.KDB_DB_SPEC = "/home/jenkins/libelektra/build/config/spec"
elektra.modules.resolver_fm_hpu_b.constants.KDB_DB_SYSTEM = "/home/jenkins/libelektra/build/config/system"
elektra.modules.resolver_fm_hpu_b.constants.KDB_DB_USER = "cdbg-1/.config"
elektra.modules.resolver_fm_hpu_b.exports = ""
elektra.modules.resolver_fm_hpu_b.exports.checkfile = "(binary)"
elektra.modules.resolver_fm_hpu_b.exports.close = "(binary)"
elektra.modules.resolver_fm_hpu_b.exports.commit = "(binary)"
elektra.modules.resolver_fm_hpu_b.exports.error = "(binary)"
elektra.modules.resolver_fm_hpu_b.exports.filename = "(binary)"
elektra.modules.resolver_fm_hpu_b.exports.freeHandle = "(binary)"
elektra.modules.resolver_fm_hpu_b.exports.get = "(binary)"
elektra.modules.resolver_fm_hpu_b.exports.open = "(binary)"
elektra.modules.resolver_fm_hpu_b.exports.set = "(binary)"
elektra.modules.resolver_fm_hpu_b.infos = "All information you want to know is in keys below"
elektra.modules.resolver_fm_hpu_b.infos.author = "Markus Raab <[email protected]>"
elektra.modules.resolver_fm_hpu_b.infos.licence = "BSD"
elektra.modules.resolver_fm_hpu_b.infos.needs = ""
elektra.modules.resolver_fm_hpu_b.infos.placements = "rollback getresolver setresolver commit"
elektra.modules.resolver_fm_hpu_b.infos.provides = "resolver"
elektra.modules.resolver_fm_hpu_b.infos.status = "productive maintained specific unittest tested libc nodep configurable default"
elektra.modules.resolver_fm_hpu_b.infos.version = 1
elektra.version = "Below are version information of the Elektra Library you are currently using"
elektra.version.constants = ""
elektra.version.constants.KDB_VERSION = "0.9.2"
elektra.version.constants.KDB_VERSION_MAJOR = 0
elektra.version.constants.KDB_VERSION_MINOR = 9
elektra.version.constants.KDB_VERSION_PATCH = 2
elektra.version.constants.SO_VERSION = 4
elektra.version.infos = "All information you want to know"
elektra.version.infos.author = "Markus Raab <[email protected]>"
elektra.version.infos.description = "Information of your Elektra Installation"
elektra.version.infos.licence = "BSD"
elektra.version.infos.version = 1

(注意:我从输出中删除了.description键,因为它们包含字符串``` ,因此破坏了Github的Markdown格式)

IMO的输出实际上应该为空,因为所有密钥均来自特定的Elektra安装,并且绝不应该导入任何KDB中。 如果kdb import正确地忽略了它们,则可能导出version.constants键是有意义的(其他version键也不应导出)。

Postcondition of backend was violated: drop key system:/elektra/modules/cache/infos/licence not belonging to "system:/elektra/modules/cache" with name "modules" but instead to "(null)" with name "(null)" because it is hidden by other mountpoint问题仅在#3447中发生,并且仅在cache插件中出现。 因此,#3447中仍然存在错误。 但是,解决此kdb export问题也会消除此问题。〜

更正:后置条件问题实际上也确实在Docker容器中发生。

在上面的容器中,我跑了(直接追赶其他东西):

ctest -R kdb_global_umount --output-on-failure

之后,任何试图访问KDB的kdb命令都会报告很多postcondition警告,例如kdb ls system

另外,如果我尝试运行kdb rm -r system ,则会得到:

Interface: Read only plugin, 'kdbSet' not supported but the key system/elektra/version (value Below are version information of the Elektra Library you are currently using) tried to be removed

kdb rm -r system失败是故意的。 您期望什么?

但是,我必须承认错误消息是非常糟糕的(甚至在语法和语义上:用户尝试了某些操作,而不是键)。

您期望什么?

公平地说,是的kdb rm -r system在实际系统中没有多大意义。 在开发设置中,它可能很有用(但是手动删除文件也不难)。

但是,我必须承认错误消息是非常糟糕的

我认为这是我最困惑的地方。 如果消息中显示“删除...不允许”之类的信息,则表示我做错了什么。 另外,我们在AFAIK中将Interface Errors定义

至于一般的version插件和只读插件:我认为应该有一种方法可以在调用kdb rm时忽略只读插件的这些错误(也许是kdb rm -rf )。
在某种程度上,至少当我们一次删除只读安装点以下的所有内容时,“删除”只读键才有意义。 kdb rm -r some/mountpoint应该删除some/mountpoint的整个基础配置文件,即后置条件是没有配置文件。 由于只读插件(至少像version这样的插件)没有配置文件,因此自动满足后置条件。

在开发设置中,它可能会很有用

为了开发,有kdb reset

如果消息中显示“删除...不允许”之类的内容

我完全同意! #3498呢?

也许kdb rm -rf

我发现-f令人困惑,因为您不能强迫它而只能忽略它,所以--without-elektra会更适合吗?

应该删除整个基础配置文件

是的,是这种情况,解析器会处理。

后置条件自动满足。

眼镜蛇,还有一个后置条件,即在kdb rm key kdb get key返回未找到的键。 此后置条件将无法实现。

更改错误消息就足够了

现在是否还存在此问题中描述的错误?

AFAIK的此一个和下一个注释(即原始问题)仍未解决: https :

抱歉,似乎我一开始误解了这个问题。 让我回顾一下,看看我现在是否正确理解了。

从高速缓存的角度来看,我们希望尽可能多地重用mmap文件。 因此,如果有人在"system/this" kdbGet上调用"system" ,我们将完全保留"system" 。 然后,当有人在"system/other" kdbGet上调用

如果我现在正确地理解了这个问题,那么您的意思是缓存"system/elektra/modules"和两者都是:

  1. 错误地
  2. 无关紧要,因为无论如何获取这些密钥都是很快的。

编辑:当前,获取缓存完全避免了ksAppend和其他操作。 因此,我们保留了OPMPHM和所有内容。 如果我们开始ksAppend-ing "system/elektra/modules"到系统挂载点的其余部分,我们肯定会失去一些性能。 也许它与系统名称空间无关,但是如果到处都有这样的极端情况,那肯定会损害性能。

注意:我将有关kdb rm system的评论标记为已解决,因此它们被Github隐藏。 那应该使这个问题更清楚一些。

如果我现在正确地理解了这个问题,那么您的意思是缓存"system/elektra/modules"和两者都是:

  1. 错误地
  2. 无关紧要,因为无论如何获取这些密钥都是很快的。

是的,只是缓存它们是错误的,但是只要有某种逻辑可以检测到密钥已更改,我们仍然可以缓存它们。 我无法评论速度,但是使用缓存可能仍然更快。 就像您说的那样,它避免了ksAppend并且还避免了对插件的大量调用。

最初的问题与kdb export的行为有关。 它的输出不得包含低于system/elektra/modulessystem/elektra/version任何键,因为这些键特定于Elektra安装,并且不应导入到另一个KDB中。

我没有调查这些键的来源,所以我不确定这里是否真的涉及到cache插件。 最好的解决方案可能是始终将这些零件中的kdb export ksCut放在kdb export 。 这样,如果发生任何更改,问题就不会再次出现。


还存在“违反了后端的后置条件”问题。 到目前为止,我的理解是此问题是由kdb exportsystem/elektra/modules生成键引起的,但我100%确信:

如果您遵循https://github.com/ElektraInitiative/libelektra/issues/3299#issuecomment -695814469中的步骤,然后运行

ctest -R kdb_global_umount --output-on-failure

bin/kdb ls system

(就像我在下一条评论中所说的那样),您将获得很多:

Postcondition of backend was violated: drop key system/elektra/modules/cache/infos/licence not belonging to "system/elektra/modules/cache" with name "modules" but instead to "(null)" with name "(null)" because it is hidden by other mountpoint

实际上,这是对cache插件的唯一引用。 AFAICT,这是这里发生的情况:

  • 测试的“备份和还原”过程使用kdb exportkdb import
  • 以某种方式这导致来自system/elektra/modules/cache的密钥被持久地写入elektra.ecf文件。
  • 然后,当我们通过kdb ls system调用任何形式的kdbGet时,我们就遇到了问题。
  • 不知道到底是什么问题,但我可以肯定,永远不要将system/elektra/modules/...密钥写入磁盘。
  • 恢复的唯一方法是_m​​anually_从elektra.ecf删除system/elektra/modules/...键。

可能必须将其固定在kdb import而不是在高速缓存中。

非常感谢您举报!

如果从kdbGet返回的KeySet中包含这些(任何)键,则缓存肯定会存储这些键。 缓存没有例外。 但是,正如您所说,在kdb import上允许这些键是没有意义的。 我将看看是否可以从您的描述中复制并修复它。

如果仅在使用kdb import时出现问题,我将在导入时直接删除这些特殊键。

我同意@mpranj的观点,即缓存应完全返回所有内容。

它的输出不得在system / elektra / modules或system / elektra / version下面包含任何键,因为这些键特定于Elektra安装,并且不应导入到另一个KDB中。

导出不仅用于导入,而且还可以为用户显示多个键/值。 kdb export system/elektra/version/constants simpleini可以正常查看所有版本信息。

我没有调查这些键的来源,因此我不确定这里是否确实包含了缓存插件。 最好的解决方案可能是始终将ksCut剪切在kdb导出中。 这样,如果发生任何更改,问题就不会再次出现。

当您说--without-elektra时,就会发生这样的ksCut --without-elektra 。 我们可以做的就是更改默认值:默认情况下不包括elektra,除非明确导入/导出/ elektra或说--with-elektra

后端的后置条件被违反

这似乎像一个无关的错误。 (也许shellrecorder没有使用--without-elektra )。 https://github.com/ElektraInitiative/libelektra/issues/3299#issuecomment -695814469,但是看起来应该是这样。 (我无法复制,我得到Error response from daemon: pull access denied for elektra-fedora-32, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.

我无法复制

我们尚未将此图像发布到docker hub。

这里的前提条件是他从scripts/docker/fedora/32/Dockerfile构建docker映像,并在运行docker build时用-t elektra-fedora-32:latest标记构建。

就像是:

cd scripts/docker/fedora/32/
docker build -t elektra-fedora-32:latest -f ./Dockerfile .

谢谢,是的,我现在可以在master上重现Postcondition of backend was violated问题(如docker镜像

 Sorry, 17 warnings were issued ;(
        Sorry, module kdb issued the warning C01320:
        Interface: Postcondition of backend was violated: drop key system/elektra/modules/cache not belonging to "system/elektra/modules/cache" with name "modules" but instead to "" with name "default" because it is hidden by other mountpoint
        Sorry, module kdb issued the warning C01320:
        Interface: Postcondition of backend was violated: drop key system/elektra/modules/cache/exports not belonging to "system/elektra/modules/cache" with name "modules" but instead to "" with name "default" because it is hidden by other mountpoint
        Sorry, module kdb issued the warning C01320:
        Interface: Postcondition of backend was violated: drop key system/elektra/modules/cache/exports/close not belonging to "system/elektra/modules/cache" with name "modules" but instead to "" with name "default" because it is hidden by other mountpoint
        Sorry, module kdb issued the warning C01320:
        Interface: Postcondition of backend was violated: drop key system/elektra/modules/cache/exports/get not belonging to "system/elektra/modules/cache" with name "modules" but instead to "" with name "default" because it is hidden by other mountpoint
        Sorry, module kdb issued the warning C01320:
        Interface: Postcondition of backend was violated: drop key system/elektra/modules/cache/exports/open not belonging to "system/elektra/modules/cache" with name "modules" but instead to "" with name "default" because it is hidden by other mountpoint
        Sorry, module kdb issued the warning C01320:
        Interface: Postcondition of backend was violated: drop key system/elektra/modules/cache/exports/set not belonging to "system/elektra/modules/cache" with name "modules" but instead to "" with name "default" because it is hidden by other mountpoint
        Sorry, module kdb issued the warning C01320:
        Interface: Postcondition of backend was violated: drop key system/elektra/modules/cache/infos not belonging to "system/elektra/modules/cache" with name "modules" but instead to "" with name "default" because it is hidden by other mountpoint
        Sorry, module kdb issued the warning C01320:
        Interface: Postcondition of backend was violated: drop key system/elektra/modules/cache/infos/author not belonging to "system/elektra/modules/cache" with name "modules" but instead to "" with name "default" because it is hidden by other mountpoint
        Sorry, module kdb issued the warning C01320:
        Interface: Postcondition of backend was violated: drop key system/elektra/modules/cache/infos/description not belonging to "system/elektra/modules/cache" with name "modules" but instead to "" with name "default" because it is hidden by other mountpoint
        Sorry, module kdb issued the warning C01320:
        Interface: Postcondition of backend was violated: drop key system/elektra/modules/cache/infos/licence not belonging to "system/elektra/modules/cache" with name "modules" but instead to "" with name "default" because it is hidden by other mountpoint
        Sorry, module kdb issued the warning C01320:
        Interface: Postcondition of backend was violated: drop key system/elektra/modules/cache/infos/metadata not belonging to "system/elektra/modules/cache" with name "modules" but instead to "" with name "default" because it is hidden by other mountpoint
        Sorry, module kdb issued the warning C01320:
        Interface: Postcondition of backend was violated: drop key system/elektra/modules/cache/infos/needs not belonging to "system/elektra/modules/cache" with name "modules" but instead to "" with name "default" because it is hidden by other mountpoint
        Sorry, module kdb issued the warning C01320:
        Interface: Postcondition of backend was violated: drop key system/elektra/modules/cache/infos/placements not belonging to "system/elektra/modules/cache" with name "modules" but instead to "" with name "default" because it is hidden by other mountpoint
        Sorry, module kdb issued the warning C01320:
        Interface: Postcondition of backend was violated: drop key system/elektra/modules/cache/infos/provides not belonging to "system/elektra/modules/cache" with name "modules" but instead to "" with name "default" because it is hidden by other mountpoint
        Sorry, module kdb issued the warning C01320:
        Interface: Postcondition of backend was violated: drop key system/elektra/modules/cache/infos/recommends not belonging to "system/elektra/modules/cache" with name "modules" but instead to "" with name "default" because it is hidden by other mountpoint
        Sorry, module kdb issued the warning C01320:
        Interface: Postcondition of backend was violated: drop key system/elektra/modules/cache/infos/status not belonging to "system/elektra/modules/cache" with name "modules" but instead to "" with name "default" because it is hidden by other mountpoint
        Sorry, module kdb issued the warning C01320:
        Interface: Postcondition of backend was violated: drop key system/elektra/modules/cache/infos/version not belonging to "system/elektra/modules/cache" with name "modules" but instead to "" with name "default" because it is hidden by other mountpoint

该问题显然与kdb export无关,因为它也会发生,例如kdb lskdb cache clear

有趣的是kdb cache clear没有帮助,但仍然可能是高速缓存的问题(因为kdb工具首先使用KDB来获取其配置)。

@mpranj你有个主意吗?

我们可以做的就是更改默认值:默认情况下不包括elektra,除非明确导入/导出/ elektra或说--with-elektra。

是的,那绝对是一个更好的解决方案。 理想情况下,我们还要区分system/elektra/modules / system/elektra/version和其余system/elektra 。 mountpoint配置和全局插件配置比模块和版本密钥(它们在运行时生成)有用得多。

该问题显然与kdb export无关,因为它也会发生,例如kdb lskdb cache clear

就像我说的那样,“后置条件”可能是kdb import

有趣的是, kdb cache clear无济于事

为什么会这样呢? 就像我说的那样,问题在于system/elektra/modules密钥存储在elektra.ecf 。 如果按照上述步骤操作(专门使用了相同的cmake选项),则可以通过运行

cat config/system/elektra.ecf

build目录中。

就像我说的那样,“后置条件”可能是kdb导入中的错误。

由于kdb import除了创建键集和调用kdbSet kdb import并没有其他作用,所以我担心问题出在kdbSet 。 在system/elektra/modules中存储任何内容的正确行为必须是错误或丢弃,并且绝对不能持久。 但这显然不是行为:

kdb set system/elektra/modules/NOTALLOWED
kdb ls system/elektra/modules
#> system/elektra/modules/NOTALLOWED
#> system/elektra/modules/cache
...

因此,当挂载NOTALLOWED插件时,我们将遇到此处描述的问题。 因此,我们需要kdbSet才能在尝试写入system/elektra/modules失败。

实际上,我们需要定义整个/elektra层次结构的语义,这可能是一个更大的任务...

问题是系统/ elektra /模块密钥存储在elektra.ecf中

抱歉,当我在试图重现它的评论之间跳来跳去时,我没有看到它。

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

sanssecours picture sanssecours  ·  4评论

markus2330 picture markus2330  ·  4评论

markus2330 picture markus2330  ·  3评论

dmoisej picture dmoisej  ·  3评论

mpranj picture mpranj  ·  3评论