[SR-Users] Htable keys and key::size inconsistencies

Fabian Borot fborot at hotmail.com
Wed Aug 31 00:16:34 CEST 2016


Hi, I am using htable module with version 4.4 storing multiple values in the same key (I set the key_type = 1 for each entry, array key).


I have found an issue with the htable module. Some keys show up when using: "./kamcmd htable.get my_table key[0]"  but when asking for the "key::size" I says that the key does not exist.

Also some entries have the "key::size" entry but the actual "key[0]" for example is reported as non existent:


See these 2 examples:

Ex:1 "key[0]" is shown but "key::size" is not:


[root at ar-mia-proxy-01 sbin]# ./kamcmd htable.get htable_lcrgwA 8[0]
{
        item: {
                name: 8[0]
                value: 555|5875|1.1.1.1|5060|0|4|1|1|Broadvox2010IN
                flags: 2
                expire: NEVER
        }
}
[root at ar-mia-proxy-01 sbin]# ./kamcmd htable.get htable_lcrgwA 8::size
error: 500 - Key name doesn't exist in htable.


Ex2: "key::size" is shown but "key[0]" is not:


[root at ar-mia-proxy-01 sbin]# ./kamcmd htable.get htable_lcrgwA 9[0]
error: 500 - Key name doesn't exist in htable.
[root at ar-mia-proxy-01 sbin]# ./kamcmd htable.get htable_lcrgwA 9::size
{
        item: {
                name: 9::size
                value: 6
                flags: 0
                expire: NEVER
        }
}


Also, for this case "9::size",  supposedly there are 6 entries and in reality there are only 4 in the tables where I am loading them from

For the case "8::size" that returns 2 the count it is right , the prob is that I can not get the "8[0]" and "8[1]" keys


Any ideas are very appreciated, thank you


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160830/f94cc597/attachment.html>


More information about the sr-users mailing list