|
|
|
|||||
|
Traversing a large Freeze Map with few locks
Can someone point me to an example of stepping through a large Freeze Map without exceeding the limit on DB locks. I found the thread on increasing the limit on max number of locks but it seems like a hack.
I'm guessing I need to release the lock every so often by letting the iterator drop out of scope. Is there an example of this somewhere? Checked the manual, the demos, and the newsletter but couldn't find anything which actually involved traversing the whole map. (If it makes a difference, I just want to read every element of the map to summarize their values. So a const_iterator is all I need.) Cheers, alex
__________________
Alex Makarenko Australian Centre for Field Robotics The University of Sydney www.cas.edu.au project: orca-robotics.sf.net |
|
||||||
|
Hi Alex,
Increasing the number of locks is not a hack, it's just the way Berkeley DB works: Berkeley DB Reference Guide: Configuring locking: sizing the system In the absence of transaction (you use a const_iterator with no explicit transaction), iterators provide repeatable reads: Berkeley DB Reference Guide: Cursor stability (which is of limited use with forward-only iterators). Berkeley DB provides additional isolation options: Berkeley DB: Db::cursor However I don't know if they work with non-transactional cursors. Currently Freeze uses just the default (flags == 0). Cheers, Bernard |
|
|||||
|
Hi Bernard, thanks for the pointers.
It's not very clear to me why it needs thousands of locks just to step through the records but of course I haven't tried very hard to understand it. I'll get back to it sometime. For now, the config file works and it's good to know that it's the official way of doing it. thanks again, alex
__________________
Alex Makarenko Australian Centre for Field Robotics The University of Sydney www.cas.edu.au project: orca-robotics.sf.net |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Freeze::Map and versioning | borax00 | Help Center | 2 | 05-10-2007 07:34 PM |
| getting normal map from freeze map | ctennis | Help Center | 2 | 03-09-2007 08:48 AM |
| Freeze map ordering | dwk | Help Center | 1 | 04-26-2004 08:44 PM |
| about Freeze::Map::iterator | sylvain | Comments | 4 | 07-21-2003 12:28 PM |
| Freeze::map.lower_bound | sylvain | Comments | 3 | 07-20-2003 02:12 PM |