[英]Sub record error while using LDT
我正在使用LDT映射,起初出現此錯誤。
com.aerospike.client.AerospikeException: Error Code 1424: LDT-Sub Record Create Error
我能夠的幫助下將其刪除ldt-enabled true
的aerospike.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.