You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Edward S. Marshall" <es...@logic.net> on 2001/12/05 16:45:08 UTC

FW: Berkeley DB 4.0 release

Hi,

I'm including this, since I didn't see a mention of it by anyone yet.
The gist of it: Sleepycat have released the 4.x strain of db. Has anyone
had a chance to look at it yet wrt compatibility issues with svn?

-- 
Edward S. Marshall <es...@logic.net>                        http://esm.logic.net/
-------------------------------------------------------------------------------
[                  Felix qui potuit rerum cognoscere causas.                  ]

----- Forwarded message: -----

Berkeley DB version 4.0.14 is available for download now from
Sleepycat Software's Web site, at

	www.sleepycat.com/download.html

Version 4 is a major new feature release for Berkeley DB.  The
most significant changes in this release are:

	+  The addition of single-master replication in the
	   new Berkeley DB High Availability product.  You can
	   read more about Berkeley DB High Availability at

		www.sleepycat.com/hafeatures.html
		www.sleepycat.com/datasheet_ha.pdf

	+  Support for group commit, to speed up write-intensive
	   high-concurrency workloads.

	+  Support for the VxWorks AE embedded operating system
	   from Wind River Systems, and certification under Wind
	   River's Tornado II IDE.

The complete change log for Berkeley DB 4.0 is at

	www.sleepycat.com/update/4.0.14/if.4.0.14.html

----- End forwarded message -----

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

Re: FW: Berkeley DB 4.0 release

Posted by Greg Stein <gs...@lyra.org>.
On Wed, Dec 05, 2001 at 05:00:18PM -0500, Garrett Rooney wrote:
> On Wed, Dec 05, 2001 at 04:49:30PM -0500, Mark Benedetto King wrote:
>...
> > Can we hide this in a macro?  Something like
> > 
> > #if SVN_FS_WANT_DB_MAJOR > 3
> > #define BDB_TXN_CHECKPOINT(e,x,y,z) (e)->txn_checkpoint(e,x,y,z)
> > #else
> > #define BDB_TXN_CHECKPOINT(e,x,y,z) txn_checkpoint(e,x,y,z)
> > #endif
> 
> the question isn't 'can we', the question is 'should we'.
> 
> IMO, supporting multiple versions of such a complicated and important
> library is just a bad idea.  the issue isn't the interface change, the
> issue is potential bugs in the older version.
> 
> i would say either switch or don't, but don't support both.

Agreed, but I think we should support both during a transitional period. If
we had a way to easily support either version, then we could simplify the
task of people wanted to test against the new BDB v4.

But given that any kind of macro would be transitional rather than
permanent, I'd say skip the macro and just use (transitional) #ifdef code in
the FS functions.

The question then becomes: what is a good patch that allows a person to
easily flip between the two versions? For example, we might be able to
change the libdb-3.3.la to libdb-$MAJOR.$MINOR.la (well, whatever the
symbols really are). That would reduce the user's change to just
configure.in. (I don't think we'd want to auto-detect one or the other)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

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

Re: FW: Berkeley DB 4.0 release

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Wed, Dec 05, 2001 at 04:49:30PM -0500, Mark Benedetto King wrote:
> > > had a chance to look at it yet wrt compatibility issues with svn?
> > 
> > I have built subversion against db-4.0.14. I used the following patch,
> > which removes support for db-3.3.11. Other than the version number,
> > the change that affects subversion is the txn_XXX to DB_TXN->txn_XXX
> > change, and since most of these provide a compatibility function, the
> > minimal change is just txn_checkpoint.
> 
> Can we hide this in a macro?  Something like
> 
> #if SVN_FS_WANT_DB_MAJOR > 3
> #define BDB_TXN_CHECKPOINT(e,x,y,z) (e)->txn_checkpoint(e,x,y,z)
> #else
> #define BDB_TXN_CHECKPOINT(e,x,y,z) txn_checkpoint(e,x,y,z)
> #endif

the question isn't 'can we', the question is 'should we'.

IMO, supporting multiple versions of such a complicated and important
library is just a bad idea.  the issue isn't the interface change, the
issue is potential bugs in the older version.

i would say either switch or don't, but don't support both.

-garrett

-- 
garrett rooney                     Unix was not designed to stop you from 
rooneg@electricjellyfish.net       doing stupid things, because that would  
http://electricjellyfish.net/      stop you from doing clever things.

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

Re: FW: Berkeley DB 4.0 release

Posted by Mark Benedetto King <bk...@answerfriend.com>.
> > had a chance to look at it yet wrt compatibility issues with svn?
> 
> I have built subversion against db-4.0.14. I used the following patch,
> which removes support for db-3.3.11. Other than the version number,
> the change that affects subversion is the txn_XXX to DB_TXN->txn_XXX
> change, and since most of these provide a compatibility function, the
> minimal change is just txn_checkpoint.

Can we hide this in a macro?  Something like

#if SVN_FS_WANT_DB_MAJOR > 3
#define BDB_TXN_CHECKPOINT(e,x,y,z) (e)->txn_checkpoint(e,x,y,z)
#else
#define BDB_TXN_CHECKPOINT(e,x,y,z) txn_checkpoint(e,x,y,z)
#endif

--ben


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

Re: FW: Berkeley DB 4.0 release

Posted by Philip Martin <pm...@uklinux.net>.
"Edward S. Marshall" <es...@logic.net> writes:

> Hi,
> 
> I'm including this, since I didn't see a mention of it by anyone yet.
> The gist of it: Sleepycat have released the 4.x strain of db. Has anyone
> had a chance to look at it yet wrt compatibility issues with svn?

I have built subversion against db-4.0.14. I used the following patch,
which removes support for db-3.3.11. Other than the version number,
the change that affects subversion is the txn_XXX to DB_TXN->txn_XXX
change, and since most of these provide a compatibility function, the
minimal change is just txn_checkpoint.

It hasn't had much testing yet, but the things I have tried have
worked.

Philip


* ac-helpers/berkeley-db: switch to db-4.0.14

* configure.in: switch to db-4.0.14

* subversion/libsvn_fs/fs.c: (cleanup_fs) switch txn_checkpoint to db-4.0.14

* subversion/libsvn_fs/trail.c: (commit_trail) switch txn_checkpoint to db-4.0.14

Index: ac-helpers/berkeley-db.m4
===================================================================
--- ac-helpers/.svn/text-base/berkeley-db.m4.svn-base	Sun Dec  2 05:11:47 2001
+++ ac-helpers/berkeley-db.m4	Wed Dec  5 17:24:45 2001
@@ -100,7 +100,7 @@
     # Linking directly to the .la is broken with --disable-shared
     # because Berkeley db does not seem to generate a .la library.
     if test "$enable_shared" = "yes"; then
-        SVN_DB_LIBS="$dbdir/libdb-3.3.la"
+        SVN_DB_LIBS="$dbdir/libdb-4.0.la"
     else
         SVN_DB_LIBS="-L$dbdir -ldb"
     fi
Index: configure.in
===================================================================
--- .svn/text-base/configure.in.svn-base	Tue Dec  4 17:13:15 2001
+++ configure.in	Wed Dec  5 17:18:11 2001
@@ -116,9 +116,9 @@
 
 # Build the filesystem library (and repository administration tool)
 # only if we have an appropriate version of Berkeley DB.
-SVN_FS_WANT_DB_MAJOR=3
-SVN_FS_WANT_DB_MINOR=3
-SVN_FS_WANT_DB_PATCH=11
+SVN_FS_WANT_DB_MAJOR=4
+SVN_FS_WANT_DB_MINOR=0
+SVN_FS_WANT_DB_PATCH=14
 SVN_LIB_BERKELEY_DB($SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MINOR,
                     $SVN_FS_WANT_DB_PATCH)
 
Index: subversion/libsvn_fs/fs.c
===================================================================
--- subversion/libsvn_fs/.svn/text-base/fs.c.svn-base	Sun Dec  2 05:11:04 2001
+++ subversion/libsvn_fs/fs.c	Wed Dec  5 17:10:09 2001
@@ -131,12 +131,12 @@
 
   /* Checkpoint any changes.  */
   {
-    int db_err = txn_checkpoint (env, 0, 0, 0);
+    int db_err = env->txn_checkpoint (env, 0, 0, 0);
 
     while (db_err == DB_INCOMPLETE)
       {
         apr_sleep (1000000L); /* microseconds, so 1000000L == 1 second */
-        db_err = txn_checkpoint (env, 0, 0, 0);
+        db_err = env->txn_checkpoint (env, 0, 0, 0);
       }
 
     /* If the environment was not (properly) opened, then txn_checkpoint
Index: subversion/libsvn_fs/trail.c
===================================================================
--- subversion/libsvn_fs/.svn/text-base/trail.c.svn-base	Sun Dec  2 05:11:12 2001
+++ subversion/libsvn_fs/trail.c	Wed Dec  5 17:10:52 2001
@@ -102,7 +102,7 @@
      The checkpoint parameters below are pretty arbitrary.  Perhaps
      there should be an svn_fs_berkeley_mumble function to set them.  */
   SVN_ERR (DB_WRAP (fs, "checkpointing after Berkeley DB transaction",
-                    txn_checkpoint (fs->env, 1024, 5, 0)));
+                    fs->env->txn_checkpoint (fs->env, 1024, 5, 0)));
 
   /* We don't destroy the pool; we assume it contains stuff which will
      be useful beyond the transaction.  */

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