Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 10-21-2004
dragzhb dragzhb is offline
Registered User
 
 
Join Date: Jul 2004
Posts: 63
Send a message via Yahoo to dragzhb
-->
Db::del: DB_RUNRECOVERY: Fatal error, run database recovery

HI bernard:
when I use Freeze Map in my mutlithread environment . it oftern occured the error : DB_RUNRECOVERY: Fatal error, run database recovery, But when I restart my program , it's ok, what's wrong ?

The following is my db environment:

I use 2 connector, one for read (mutlithread) and another for write, how can I avoid this error?
Reply With Quote
  #2 (permalink)  
Old 10-21-2004
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: 816
With so little information on your application, it's hard to tell.
These two Freeze connections, do they share the same Ice communicator? If not, this would be a problem. Next, be careful with connections:

Connection and map objects are “single threaded”: if you want to use a connection or any of its associated maps from multiple threads, you must serialize access to them. If your application requires concurrent access to the same database file (persistent Map), you must create several connec-tions and associated maps.

In particular if you use iterators, you are very likely to run into troubles with concurrent non-serialized access to a connection or any of its maps.

Cheers,
Bernard
Reply With Quote
  #3 (permalink)  
Old 10-21-2004
dragzhb dragzhb is offline
Registered User
 
 
Join Date: Jul 2004
Posts: 63
Send a message via Yahoo to dragzhb
-->
HI bernard:
thanks for your quickly response, I foud the problem. it's that I don't lock freeze map for write and read.

thanks
Reply With Quote
  #4 (permalink)  
Old 10-22-2004
dragzhb dragzhb is offline
Registered User
 
 
Join Date: Jul 2004
Posts: 63
Send a message via Yahoo to dragzhb
-->
HI bernard:
I found another problem, when I read freeze map in one Connection (mutlithread and with high load ), but when write to freeze map in other connection (they are same database file) , the written thread hang up. and after that all ICE has hang up, can't do anything, I think this problem is in Berkeley DB and it has no any exception return. it has occured deadlock.

my question is : did any Connection want to use lock to lock each other?
Reply With Quote
  #5 (permalink)  
Old 10-22-2004
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: 816
Freeze configures Berkeley DB with deadlock detection, so if your application creates a database deadlock (with only Berkeley DB locks involved), you'll get an exception.

If you use iterators, you must be very careful to close them when no longer needed. Otherwise, these iterators will keep database read locks and will "lock out" your writer.

Cheers,
Bernard
Reply With Quote
  #6 (permalink)  
Old 10-23-2004
dragzhb dragzhb is offline
Registered User
 
 
Join Date: Jul 2004
Posts: 63
Send a message via Yahoo to dragzhb
-->
I see, thanks
Reply With Quote
  #7 (permalink)  
Old 10-23-2004
dragzhb dragzhb is offline
Registered User
 
 
Join Date: Jul 2004
Posts: 63
Send a message via Yahoo to dragzhb
-->
HI bernard:
I can't find how to close iterator in C++?

iterator.close() not a function of iterator.

Last edited by dragzhb : 10-23-2004 at 07:56 AM.
Reply With Quote
  #8 (permalink)  
Old 10-23-2004
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: 816
In C++, you close an iterator by destroying it or by assigning <map object>.end() to it.

Cheers,
Bernard
Reply With Quote
  #9 (permalink)  
Old 10-24-2004
dragzhb dragzhb is offline
Registered User
 
 
Join Date: Jul 2004
Posts: 63
Send a message via Yahoo to dragzhb
-->
thanks
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
Db_runrecovery Error pradeep Help Center 5 11-30-2006 12:26 AM
ICE connection lifecycle information/implementing recovery mcrystal Help Center 1 09-28-2006 06:04 PM
fatal error C1189: #error : WINDOWS.H already included delloby Help Center 1 02-05-2006 02:58 AM
fatal error C1189: #error : "Ice for Visual C++ 6.0 requires STLport" richardma Help Center 4 01-13-2006 07:23 AM
create proxy and database Mr.Freeze Help Center 3 09-04-2003 03:16 AM


All times are GMT -4. The time now is 06:17 PM.


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.