miconda left a comment (kamailio/kamailio#4809)

> Since AFAICT the only thing writing to the permissions and the dispatcher 
> tables is the reload function, which always constructs a brand new table and 
> then switches them out, I would suggest to add a reference count to the 
> tables in question. That would allow arbitrary concurrent read access while 
> also making simultaneous reloads safe, with minimal added overhead. It would 
> also make the current (unsafe) double-buffering and rate-limiting approach 
> obsolete. Willing to implement if acceptable.

Reference counters could be a good option, but having only a single table can 
lead to (rather long) blocking, in the way that when a reload is triggered, SIP 
workers that already started have to finish their walk through records to 
dereference the table, while other SIP workers that want to start have to be 
stopped and wait for the reload to finish.

Keeping two (or even more) tables can be good for many reloads triggered in 
short time, having an active table and a list of old tables that are kept till 
reference counter gets to 0.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4809#issuecomment-4915638486
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/issues/4809/[email protected]>
_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to