Aerospike lset add fail when i add different integers to the ldt set!


#1

aerospike lset set add fail for some number when i add integer (0->600) to asd, here is my c example code an i have remove the key from the set.

as_integer ival;

#define COUNT (600) char val_buf[COUNT + 1]; for (int i=0; i<COUNT; i++) { as_integer_init(&ival, i);

    // Add a string value to the set.
    if (aerospike_lset_add(&as, &err, NULL, &g_key, &lset,
                (const as_val*)&ival) != AEROSPIKE_OK) {
        LOG("second aerospike_set_add() returned %d - %s for index %d", err.code,
                err.message, i);
        //example_cleanup(&as);
        //exit(-1);
    }
}

and the error is always the same here: second aerospike_set_add() returned 1300 - /opt/aerospike/sys/udf/lua/ldt/ldt_common.lua:945: 1424:LDT-Sub Record C reate Error for index 482 second aerospike_set_add() returned 1300 - /opt/aerospike/sys/udf/lua/ldt/ldt_common.lua:945: 1424:LDT-Sub Record C reate Error for index 483 second aerospike_set_add() returned 1300 - /opt/aerospike/sys/udf/lua/ldt/ldt_common.lua:945: 1424:LDT-Sub Record C reate Error for index 492 second aerospike_set_add() returned 1300 - /opt/aerospike/sys/udf/lua/ldt/ldt_common.lua:945: 1424:LDT-Sub Record C reate Error for index 493

dose ldt set conflision with deferent integers perform normal ? and can any senior tell me how to fix this.


#2

Whenever I see a Sub-Record error, my first question will always be: Do you have “ldt-enabled true” turned on for your namespace in your aerospike.conf file?

Further Explanation: For new LDTs, a certain amount of data (determined by a threshold value) is kept in the top record before it is converted to a full hash table. Furthermore, for LSET and LMAP, we allow a few items (if they are small) to be held in a hash cell before it is converted to a sub-record. I’m guessing that you’re hitting the point at which the first sub-record is being created. If the config value, ldt-enabled, is false (the default value), then you’ll get your first error when you try to create a sub-record.


#3

en. i have tried with the option “ldt-enabled true” and that worked, thx a lot.


#4

Hi, 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

Any pointers ?


#5

We have made major stability fixes on LDT in the 3.4.1 release. We also recommend using LLIST as the data-structure. It is the most robust and stable data-structure, backed by a b+ tree. All use-case functionality needed can be supported by LLIST data-structure.


#6

@xuthief and @holmes:

Thank you for posting about LDTs in our forum. Please see the LDT Feature Guide for current LDT recommendations and best practices.


#7

@xuthief and @holmes:

Effective immediately, we will no longer actively support the LDT feature and will eventually remove the API. The exact deprecation and removal timeline will depend on customer and community requirements. Instead of LDTs, we advise that you use our newer List and SortedMap APIs, which are now available in all Aerospike-supported clients at the General Availability level. Read our blog post for details.