Summary: | ASTERISK-03567: [PATCH] make member persistence future-proof | ||
Reporter: | Kevin P. Fleming (kpfleming) | Labels: | |
Date Opened: | 2005-02-22 18:19:17.000-0600 | Date Closed: | 2008-01-15 15:26:49.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_queue |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) queue_persist_format_rev1.diff.txt ( 1) queue_persist_format_rev2.diff.txt | |
Description: | The current code to persist/restore dynamic members has a number of problems: - it leaks memory on reload - it dumps the members out to the db for every member that gets added during reload - the storage format is not able to be extended easily This last issue is the reason for this patch; the current storage format for members uses _no_ indicator for where a "record" begins and ends, and as such when we add new fields (which has already happened) the parsing code gets more complicated. In addition, depending on how far back the user is upgrading from, the parsing may fail completely. This patch changes the storage format to use a different separator for fields and records, so that it will be easy to extend by adding more fields in the future. This does, however, break backwards compatibility for anyone who has been using CVS HEAD and dynamic members... but it's better to do that now, than do deal with it in the future once it has been released in a stable version. ****** ADDITIONAL INFORMATION ****** Disclaimer is on file. | ||
Comments: | By: Mark Spencer (markster) 2005-02-22 23:06:08.000-0600 Are you sure about that value_len = res vs. value_len += res ? By: Kevin P. Fleming (kpfleming) 2005-02-23 00:12:10.000-0600 Yep, that's a mistake :-( I only tested it with two members here, that didn't expose the problem. Corrected patch uploaded. By: Mark Spencer (markster) 2005-03-03 14:34:13.000-0600 Added to CVS head, thanks! By: Digium Subversion (svnbot) 2008-01-15 15:26:49.000-0600 Repository: asterisk Revision: 5130 U trunk/apps/app_queue.c U trunk/channels/chan_agent.c ------------------------------------------------------------------------ r5130 | markster | 2008-01-15 15:26:48 -0600 (Tue, 15 Jan 2008) | 2 lines Member presistance improvements (bug ASTERISK-3567) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=5130 |