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

[PATCH] Re: Berkeley DB 4.3.21

From: Jani Averbach <jaa_at_jaa.iki.fi>
Date: 2004-11-10 19:25:51 CET

On 2004-11-10 09:57-0600, kfogel@collab.net wrote:
> Jani Averbach <jaa@jaa.iki.fi> writes:
> > I have run our regression tests (trunk) against the 4.3.X series, and it has
> > been working ok here. You can't just drop it in, because it needs few
> > trivial code changes which are not yet ported to the trunk.
> >
> > > Is 4.2.52 still the recommended version?
> >
> > Definitely, at least until we get 4.3.X code in the trunk. =)
>
> Heh. Is it easy for us to make the two versions co-exist happily in
> our code? If you know the code changes, can you list them here? (I
> understand you might not have time to make a patch, but maybe we can
> save someone else some time...)

I have run trunk and regression tests against BDB 4.3 from 2004-09-21,
and I have run couple of instances of our stress.pl against it (10
instance of stress.pl, 10000 rev) on dual SMP system (on amd64 Linux,
over ext3 and over tmpfs), and didn't find anything.

A Nice thing of BDB 4.3 is that it adds official support for amd64
systems, however, 4.2. has also worked just fine in the past.

BR, Jani

Patch for APR 0.9.X:
http://marc.theaimsgroup.com/?l=apr-dev&m=109581837027145&w=2

APR differencies between 0.9.X and 1.0.X
http://marc.theaimsgroup.com/?l=apr-dev&m=109595023015477&w=2

A Patch for Subversion trunk:

Log:
Add _unconditional_ non-backward compatible support for BDB 4.3.

* subversion/libsvn_fs_base/bdb/strings-table.c
   (locate_key, get_next_length): Use DB_BUFFER_SMALL instead of
      ENOMEM.

* subversion/libsvn_fs_base/fs.c
   (bdb_error_gatherer): Signature changed, it now takes also
      'DB_ENV *dbenv' as argument.

Index: subversion/libsvn_fs_base/bdb/strings-table.c
===================================================================
--- subversion/libsvn_fs_base/bdb/strings-table.c (revision 11815)
+++ subversion/libsvn_fs_base/bdb/strings-table.c (working copy)
@@ -112,13 +112,13 @@
     {
       DBT rerun;
 
- if (db_err != ENOMEM)
+ if (db_err != DB_BUFFER_SMALL)
         {
           (*cursor)->c_close (*cursor);
           return BDB_WRAP (fs, "moving cursor", db_err);
         }
 
- /* We got an ENOMEM (typical since we have a zero length buf), so
+ /* We got an DB_BUFFER_SMALL (typical since we have a zero length buf), so
          we need to re-run the operation to make it happen. */
       svn_fs_base__clear_dbt (&rerun);
       rerun.flags |= DB_DBT_USERMEM | DB_DBT_PARTIAL;
@@ -160,13 +160,13 @@
     {
       DBT rerun;
 
- if (db_err != ENOMEM)
+ if (db_err != DB_BUFFER_SMALL)
         {
           cursor->c_close (cursor);
           return db_err;
         }
 
- /* We got an ENOMEM (typical since we have a zero length buf), so
+ /* We got an DB_BUFFER_SMALL (typical since we have a zero length buf), so
          we need to re-run the operation to make it happen. */
       svn_fs_base__clear_dbt (&rerun);
       rerun.flags |= DB_DBT_USERMEM | DB_DBT_PARTIAL;
Index: subversion/libsvn_fs_base/fs.c
===================================================================
--- subversion/libsvn_fs_base/fs.c (revision 11815)
+++ subversion/libsvn_fs_base/fs.c (working copy)
@@ -299,7 +299,7 @@
 
 /* BDB error callback. See bdb_errcall_baton_t in fs.h for more info. */
 static void
-bdb_error_gatherer (const char *char_baton, char *msg)
+bdb_error_gatherer (const DB_ENV *dbenv, const char *char_baton, const char *msg)
 {
   bdb_errcall_baton_t *ec_baton = (bdb_errcall_baton_t *) char_baton;
 

-- 
Jani Averbach
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 10 19:26:42 2004

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.