Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

berkeley db filesystems

Subversion filesystems based on Berkeley DB. More...


Modules

group  berkeley db filesystem compatibility
 The following functions are similar to their generic counterparts, but only work on Berkeley DB filesystems.

Functions

svn_error_tsvn_fs_set_berkeley_errcall (svn_fs_t *fs, void(*handler)(const char *errpfx, char *msg))
 Register an error handling function for Berkeley DB error messages.
svn_error_tsvn_fs_berkeley_recover (const char *path, apr_pool_t *pool)
 Perform any necessary non-catastrophic recovery on a Berkeley DB-based Subversion filesystem, stored in the environment path.
svn_error_tsvn_fs_berkeley_logfiles (apr_array_header_t **logfiles, const char *path, svn_boolean_t only_unused, apr_pool_t *pool)
 Set *logfiles to an array of const char * log file names of Berkeley DB-based Subversion filesystem.

Detailed Description

Subversion filesystems based on Berkeley DB.

The following functions are specific to Berkeley DB filesystems.


Function Documentation

svn_error_t* svn_fs_berkeley_logfiles apr_array_header_t **  logfiles,
const char *  path,
svn_boolean_t  only_unused,
apr_pool_t *  pool
 

Set *logfiles to an array of const char * log file names of Berkeley DB-based Subversion filesystem.

If only_unused is TRUE, set *logfiles to an array which contains only the names of Berkeley DB log files no longer in use by the filesystem. Otherwise, all log files (used and unused) are returned.

This function wraps the Berkeley DB 'log_archive' function called by the db_archive binary. Repository administrators may want to run this function periodically and delete the unused log files, as a way of reclaiming disk space.

svn_error_t* svn_fs_berkeley_recover const char *  path,
apr_pool_t *  pool
 

Perform any necessary non-catastrophic recovery on a Berkeley DB-based Subversion filesystem, stored in the environment path.

Do any necessary allocation within pool.

After an unexpected server exit, due to a server crash or a system crash, a Subversion filesystem based on Berkeley DB needs to run recovery procedures to bring the database back into a consistent state and release any locks that were held by the deceased process. The recovery procedures require exclusive access to the database --- while they execute, no other process or thread may access the database.

In a server with multiple worker processes, like Apache, if a worker process accessing the filesystem dies, you must stop the other worker processes, and run recovery. Then, the other worker processes can re-open the database and resume work.

If the server exited cleanly, there is no need to run recovery, but there is no harm in it, either, and it take very little time. So it's a fine idea to run recovery when the server process starts, before it begins handling any requests.

svn_error_t* svn_fs_set_berkeley_errcall svn_fs_t fs,
void(*)(const char *errpfx, char *msg)  handler
 

Register an error handling function for Berkeley DB error messages.

If a Berkeley DB error occurs, the filesystem will call handler with two strings: an error message prefix, which will be zero, and an error message. handler should print it out, log it somewhere, etc.

Since Berkeley DB's error messages are sometimes much more informative than the error codes the functions return, it's worth calling this function and providing some kind of error message handler.

This function calls DBENV->set_errcall, with handler as the db_errcall_fcn argument.


Generated on Thu Aug 25 00:11:42 2005 for Subversion by  doxygen 1.3.9.1