The delete is from timer process, independent of processing REGISTER requests that are handled in another processes. If you need some delay when removing contact for db_mode=2, look at the parameter:
Otherwise, adding locking/syncronization will introduce a bottleneck, decreasing the performances. And overall, even it would be serialized, I think it is better to do delete first, so the insert/update is going to be faster, not having key constraints checking on invalid records. Even more, the phones usually have to re-register several seconds before expiration of their last registration, otherwise network transmission can add delay and the old record is removed anyhow, typically is 20-30sec before expiration when the expire value is at least a few minutes. In your case, it seems it is 1 minute.
If you need to discuss further, then join sr-users@lists.kamailio.org, there are a lot of options that allows tuning usrloc for specific use cases. Here we track bugs in the C code and for now look more like a design decision than a bug. If proves to be a bug after discussions, then it can be reopened.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.