I am using LDT map and at first got this error.
com.aerospike.client.AerospikeException: Error Code 1424: LDT-Sub Record Create Error
I was able to remove it with the help of ldt-enabled true
in aerospike.conf
but now I am running into
com.aerospike.client.AerospikeException: Error Code 1422: LDT-Sub Record Open Error
Code snippet :
for (Entry<String, Map<String, Object>> myLdtBin: myLdtMap.entrySet()) {
LargeMap lmap = client.getLargeMap(myWritePolicy, myKey, myLdtBin.getKey() , null);
lmap.put(myLdtBin.getValue()); //<-- Error here
}
Any pointers ?
Aerospike has put in major stability fixes in 3.4.1 for LDT. Please see if this issue appears still in 3.4.1
Also, the recommended data-structure to use is LLIST. It is backed by a B+ tree, and is the most extensible.
Not sure what the actual problem is, but I hit the same problem today. I'm using LSTACK, but internally it uses a LIST. My problem was that the default LSTACK configuration is quite limited in terms of list elements count. I was trying to insert about 200 elements in a LSTACK, but it seems the default config allows a maximum of 100. Take a look at the LDT Configuration page . Here is a simple example of a extended configuration for a 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;
Just add your config to a Lua UDF, and pass it as 'userModule' param to put
method. Make some tests to determine the correct configuration you might need. Look at /opt/aerospike/sys/udf/lua/ldt/settings_llist.lua
for the current LLIST settings and what can be changed.
EDIT:
Here is the default configuration for 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
It seems the max default LLIST size is 100. Change it and test.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.