Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 07-02-2007
n2503v n2503v is offline
Registered User
 
Name: Alex Makarenko
Organization: ACFR, University of Sydney
Project: Orca
 
Join Date: Jun 2005
Posts: 82
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
Reply With Quote
  #2 (permalink)  
Old 07-02-2007
bernard's Avatar
bernard bernard is online now
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 817
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
__________________
Bernard Normier
ZeroC, Inc.
Reply With Quote
  #3 (permalink)  
Old 07-04-2007
n2503v n2503v is offline
Registered User
 
Name: Alex Makarenko
Organization: ACFR, University of Sydney
Project: Orca
 
Join Date: Jun 2005
Posts: 82
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
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT -4. The time now is 11:41 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.