繁体   English   中英

使用LDT时的子记录错误

[英]Sub record error while using LDT

我正在使用LDT映射,起初出现此错误。

com.aerospike.client.AerospikeException: Error Code 1424: LDT-Sub Record Create Error

我能够的帮助下将其删除ldt-enabled trueaerospike.conf
但是现在我遇到了

com.aerospike.client.AerospikeException: Error Code 1422: LDT-Sub Record Open Error

程式码片段:

for (Entry<String, Map<String, Object>> myLdtBin: myLdtMap.entrySet()) {
    LargeMap lmap = client.getLargeMap(myWritePolicy, myKey, myLdtBin.getKey() , null);
    lmap.put(myLdtBin.getValue()); //<-- Error here
}

有指针吗?

Aerospike已在LDT的3.4.1中添加了主要的稳定性修复程序。 请查看此问题是否仍在3.4.1中

另外,推荐使用的数据结构是LLIST。 它由B +树支持,并且是最可扩展的。

不知道实际的问题是什么,但是我今天遇到了同样的问题。 我正在使用LSTACK,但在内部使用LIST。 我的问题是,默认LSTACK配置在列表元素数量方面非常有限。 我试图在LSTACK中插入大约200个元素,但是默认配置似乎最多允许100个。请查看LDT Configuration页面 这是LSTACK扩展配置的简单示例:

local userModule = {};

function userModule.adjust_settings( ldtMap )
  local ldt_settings=require('ldt/settings_lstack');
  ldt_settings.use_package( ldtMap, "ListMediumObject" );

  ldt_settings.set_coldlist_max( ldtMap, 100 )
  ldt_settings.set_colddir_rec_max( ldtMap, 10000 )
end

return userModule;

只需将您的配置添加到Lua UDF,然后将其作为“ userModule”参数传递给put方法即可。 进行一些测试以确定您可能需要的正确配置。 /opt/aerospike/sys/udf/lua/ldt/settings_llist.lua查找当前的LLIST设置以及可以更改的内容。

编辑:

这是LLIST的默认配置:

-- LLIST Inner Node Settings
ldtMap[LS.NodeListMax] = 100;  -- Max # of items (key+digest)
ldtMap[LS.NodeByteCountMax] = 0; -- Max # of BYTES

-- LLIST Tree Leaves (Data Pages)
ldtMap[LS.LeafListMax] = 100;  -- Max # of items
ldtMap[LS.LeafByteCountMax] = 0; -- Max # of BYTES per data page

看起来最大的默认LLIST大小是100。更改它并进行测试。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM