[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: FW: FW: Berkeley DB error while opening `changes' table for filesystem [#8143]

From: <kfogel_at_collab.net>
Date: 2003-05-27 04:45:10 CEST

"Sander Striker" <striker@apache.org> writes:
> [Forwarded to the dev@ list with permission]
>
> -----Original Message-----
> From: Keith Bostic [mailto:bostic@abyssinian.sleepycat.com]
>
> Also, Berkeley DB should always be outputting additional error
> information whenever when it returns EINVAL, do you configure
> your systems to log those additional errors? That might give
> us more information to to work with, as well. If you're not
> familiar with the additional error information messages, see the
> DB_ENV->set_errfile and DB->set_errfile method documentation.

Hmmm. We're not doing this anywhere, and we probably should.

The simplest thing would be to just call DB_ENV->set_errfile(). From
http://www.sleepycat.com/docs/api_c/db_set_errfile.html:

   When an error occurs in the Berkeley DB library, a Berkeley DB
   error or an error return value is returned by the function. In some
   cases, however, the errno value may be insufficient to completely
   describe the cause of the error especially during initial
   application debugging.

   The DB_ENV->set_errfile and DB->set_errfile methods are used to
   enhance the mechanism for reporting error messages to the
   application by setting a C library FILE * to be used for displaying
   additional Berkeley DB error messages. In some cases, when an error
   occurs, Berkeley DB will output an additional error message to the
   specified file reference.

   The error message will consist of the prefix string and a colon
   (":") (if a prefix string was previously specified using
   DB->set_errpfx or DB_ENV->set_errpfx), an error string, and a
   trailing <newline> character.

   This error logging enhancement does not slow performance or
   significantly increase application size, and may be run during
   normal operation as well as during application debugging.

   For DB handles opened inside of Berkeley DB environments, calling
   the DB->set_errfile method affects the entire environment and is
   equivalent to calling the DB_ENV->set_errfile method.

   The DB->set_errfile interface may be called at any time during the
   life of the application.

If we call DB_ENV->set_errfile(), what FILE * do we pass it? Do we
open a unique filename (perhaps with a timestamp in its name) for
every time we open a BDB environment, and clean up the file if there
are no errors?

Thoughts welcome.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 27 05:28:01 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.