One option would be to increment by 0 using a memcached_increment and use the return value, this way we keep the atomic feature provided by memcached.<br><br>However this would break the cachedb abstraction since we would not use a normal &quot;cdb_func.get&quot; but a cdb_func.add &quot;0&quot;<br>
<br>dialog profile -get-&gt; | cachedb |  memcached<br><br>Cachedb specific feature like increment may not be easily abstracted.<br><br><br><br><br><br><div class="gmail_quote">On Mon, Jan 14, 2013 at 11:52 AM, Julien Chavanton <span dir="ltr">&lt;<a href="mailto:jchavanton@gmail.com" target="_blank">jchavanton@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I found out that the problem is taking place in memcached, once the size of a value is not lowered when decrementing. <br>
<br>This is what we have int memcached after having reached a dialog profile of a number with more then 2 digits (10+)<br>
<br># Increment<br>incr dlg_val_caller_ODA1MQ== 1.<br>1.<br><br># Get the value (size 2 !!)<br>get dlg_val_caller_ODA1MQ== .<br>VALUE dlg_val_caller_ODA1MQ== 0 2.<br>1 .<br>END.<br><br># Decrement<br>decr dlg_size_caller 1.<br>

0.<br><br>----------------------------------------------------------<br><br>Then str2int is failing in dlg_profile.c <br><br> if (str2int(&amp;ret, &amp;n) &lt; 0) {<br>                        LM_ERR(&quot;invalid int value in CacheDB &lt;%.*s&gt;\n&quot;,<div class="HOEnZb">
<div class="h5"><br>
<br><br><br><br><div class="gmail_quote">On Mon, Jan 14, 2013 at 10:34 AM, Julien Chavanton <span dir="ltr">&lt;<a href="mailto:jchavanton@gmail.com" target="_blank">jchavanton@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi, I found a problem that may require more investigation but just in case I do not look into it further I wanted to raise the issue.<br><br>Problem found while testing dialog profiles :<br> <br>
ERROR:dialog:get_profile_size: invalid int value in CacheDB &lt;1 &gt;
<br>
ERROR:dialog:get_profile_size: invalid int value in CacheDB &lt;0 &gt;
<br>

<br>
This problem with the white space as triggered while testing when the profile get higher then 10 ?<br><br><br>
</blockquote></div><br>
</div></div></blockquote></div><br>