Re: [PATCH] improved store-file

Alexander Malysh <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi Kalle,

some comments to your patch...

1) don't use dict if you don't know how many items will be stored (dict
filled to more as 80% works very slow). Here we should use something like
red-black-tree.
2) don't call any functions in signal handler that are not signal safe (you
call gwthread_wakeup_all())
3) check for 'file != NULL' in 'int store_save(Msg *msg)'. Because file !=
NULL is our marker for enabled store-file support (store-file support is
optional).


Kalle Marjola wrote:

> Attached a patch (against CVS) that greatly improves store-file:
> It uses Dict instead of List to save messages to memory.
> Moreover, acknowledged messages are immediately cleaned from
> memory, instead of being done in a background thread (that thread
> simple dumps current state to file to reduce startup-times).
> And, above this all, now it is possible to define the frequency
> how often this 'cleanup' is done..
> 
> Thus it is far more powerful if queues are created, and I
> greatly encourage all kannel instances to use it, at least
> after it has gained adequate extra testing (I have done some
> tests but more are naturally needed)
> 
> As part of the patch, smskannel.conf is updated to enable
> store-file - I know that lots of Kannel installation are based
> on smskannel.conf which is then modified...
> 
> Comments?
> I can put this into CVS immediately after Stipe puts out 1.4.0,..
> 

-- 
Thanks,
Alex
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.