You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mark Grosberg <ma...@gladesoft.com> on 2004/11/10 08:26:33 UTC

Berkeley DB 4.3.21

Hello all,

It seems Sleepycat has released a new Berkeley DB (v4.3.21). It seems to 
have a few bug fixes related to certain overflow cases. Has anybody tried 
building with this new BDB? Perhaps it may help some of the corruption 
issues people are still seeing.

Is 4.2.52 still the recommended version?

- Mark G.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: [PATCH] Re: Berkeley DB 4.3.21

Posted by kf...@collab.net.
Jani Averbach <ja...@jaa.iki.fi> writes:
> 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:
>
> [...]

Thanks!  I've filed issue #2120 with this patch, and set it for
release 1.3, since it would be going a bit too far to cram this change
into 1.2 I think.

We should look into making a two-way compatible patch for 1.3 if we
can, of course.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Re: Berkeley DB 4.3.21

Posted by kf...@collab.net.
Jani Averbach <ja...@jaa.iki.fi> writes:
> 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:
>
> [...]

Thanks!  I've filed issue #2120 with this patch, and set it for
release 1.3, since it would be going a bit too far to cram this change
into 1.2 I think.

We should look into making a two-way compatible patch for 1.3 if we
can, of course.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

[PATCH] Re: Berkeley DB 4.3.21

Posted by Jani Averbach <ja...@jaa.iki.fi>.
On 2004-11-10 09:57-0600, kfogel@collab.net wrote:
> Jani Averbach <ja...@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: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

[PATCH] Re: Berkeley DB 4.3.21

Posted by Jani Averbach <ja...@jaa.iki.fi>.
On 2004-11-10 09:57-0600, kfogel@collab.net wrote:
> Jani Averbach <ja...@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

Re: Berkeley DB 4.3.21

Posted by kf...@collab.net.
Jani Averbach <ja...@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...)

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Berkeley DB 4.3.21

Posted by Jani Averbach <ja...@jaa.iki.fi>.
On 2004-11-10 03:26-0500, Mark Grosberg wrote:
> 
> Hello all,
> 
> It seems Sleepycat has released a new Berkeley DB (v4.3.21). It seems to 
> have a few bug fixes related to certain overflow cases. Has anybody tried 
> building with this new BDB? 

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.

> Perhaps it may help some of the corruption issues people are still
> seeing.
> 
> Is 4.2.52 still the recommended version?
>

Definitely, at least until we get 4.3.X code in the trunk. =)

BR, Jani

-- 
Jani Averbach


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Berkeley DB 4.3.21

Posted by kf...@collab.net.
Mark Grosberg <ma...@gladesoft.com> writes:
> It seems Sleepycat has released a new Berkeley DB (v4.3.21). It seems
> to have a few bug fixes related to certain overflow cases. Has anybody
> tried building with this new BDB? Perhaps it may help some of the
> corruption issues people are still seeing.
> 
> Is 4.2.52 still the recommended version?

Yes, until we have some experience with 4.3.X... have you tried it?
Is it working well for you?

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org