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

[PATCH] Support for BDB 4.1.24

From: Justin Erenkrantz <jerenkrantz_at_apache.org>
Date: 2002-09-19 11:22:29 CEST

This patch starts to try to get SVN working with BDB 4.1.24. The
two biggest things I've seen so far is that the open function
changed to take a DB_TXN argument (the BDB code I saw in their tree
passed NULL, but I'm not really confident that is correct) and the
fact that DB_INCOMPLETE seems to have been removed.

So, it compiles with this. Yet, something is still broken with
this as all of the BDB tests fail with something like:

Berkeley DB error while storing node revision for filesystem test-repo-write-new-rep:
Invalid argument

Anyone have any brilliant ideas?

As to why we would want to upgrade to 4.1.24, the changes:

http://www.sleepycat.com/update/4.1.24/if.4.1.24.html

I'm sure it's something silly (too tired to figure out what it is
right now), but I figure I'd post the preliminary patch so that we
can have the discussion of whether we want to include 4.1 support
before I spend more time on this. -- justin

Index: subversion/libsvn_fs/bdb/txn-table.c
===================================================================
--- subversion/libsvn_fs/bdb/txn-table.c
+++ subversion/libsvn_fs/bdb/txn-table.c 2002-09-19 01:18:24.660015000 -0700
@@ -46,7 +46,7 @@
   DB *txns;
 
   DB_ERR (db_create (&txns, env, 0));
- DB_ERR (txns->open (txns, "transactions", 0, DB_BTREE,
+ DB_ERR (txns->open (txns, NULL, "transactions", 0, DB_BTREE,
                       create ? (DB_CREATE | DB_EXCL) : 0,
                       0666));
 
Index: subversion/libsvn_fs/bdb/reps-table.c
===================================================================
--- subversion/libsvn_fs/bdb/reps-table.c
+++ subversion/libsvn_fs/bdb/reps-table.c 2002-09-19 01:17:44.560007000 -0700
@@ -38,7 +38,7 @@
   DB *reps;
 
   DB_ERR (db_create (&reps, env, 0));
- DB_ERR (reps->open (reps, "representations", 0, DB_BTREE,
+ DB_ERR (reps->open (reps, NULL, "representations", 0, DB_BTREE,
                       create ? (DB_CREATE | DB_EXCL) : 0,
                       0666));
 
Index: subversion/libsvn_fs/bdb/copies-table.c
===================================================================
--- subversion/libsvn_fs/bdb/copies-table.c
+++ subversion/libsvn_fs/bdb/copies-table.c 2002-09-19 01:17:20.600011000 -0700
@@ -38,7 +38,7 @@
   DB *copies;
 
   DB_ERR (db_create (&copies, env, 0));
- DB_ERR (copies->open (copies, "copies", 0, DB_BTREE,
+ DB_ERR (copies->open (copies, NULL, "copies", 0, DB_BTREE,
                         create ? (DB_CREATE | DB_EXCL) : 0,
                         0666));
 
Index: subversion/libsvn_fs/bdb/strings-table.c
===================================================================
--- subversion/libsvn_fs/bdb/strings-table.c
+++ subversion/libsvn_fs/bdb/strings-table.c 2002-09-19 01:18:13.240002000 -0700
@@ -41,7 +41,7 @@
      multiple records. Note: this must occur before ->open(). */
   DB_ERR (strings->set_flags (strings, DB_DUP));
 
- DB_ERR (strings->open (strings, "strings", 0, DB_BTREE,
+ DB_ERR (strings->open (strings, NULL, "strings", 0, DB_BTREE,
                        create ? (DB_CREATE | DB_EXCL) : 0,
                        0666));
 
Index: subversion/libsvn_fs/bdb/rev-table.c
===================================================================
--- subversion/libsvn_fs/bdb/rev-table.c
+++ subversion/libsvn_fs/bdb/rev-table.c 2002-09-19 01:18:01.610011000 -0700
@@ -34,7 +34,7 @@
   DB *revisions;
 
   DB_ERR (db_create (&revisions, env, 0));
- DB_ERR (revisions->open (revisions, "revisions", 0, DB_RECNO,
+ DB_ERR (revisions->open (revisions, NULL, "revisions", 0, DB_RECNO,
                            create ? (DB_CREATE | DB_EXCL) : 0,
                            0666));
 
Index: subversion/libsvn_fs/bdb/changes-table.c
===================================================================
--- subversion/libsvn_fs/bdb/changes-table.c
+++ subversion/libsvn_fs/bdb/changes-table.c 2002-09-19 01:16:47.560010000 -0700
@@ -45,7 +45,7 @@
      one-per-row. Note: this must occur before ->open(). */
   DB_ERR (changes->set_flags (changes, DB_DUP));
 
- DB_ERR (changes->open (changes, "changes", 0, DB_BTREE,
+ DB_ERR (changes->open (changes, NULL, "changes", 0, DB_BTREE,
                          create ? (DB_CREATE | DB_EXCL) : 0,
                          0666));
 
Index: subversion/libsvn_fs/bdb/nodes-table.c
===================================================================
--- subversion/libsvn_fs/bdb/nodes-table.c
+++ subversion/libsvn_fs/bdb/nodes-table.c 2002-09-19 01:17:33.530007000 -0700
@@ -44,7 +44,7 @@
   DB *nodes;
 
   DB_ERR (db_create (&nodes, env, 0));
- DB_ERR (nodes->open (nodes, "nodes", 0, DB_BTREE,
+ DB_ERR (nodes->open (nodes, NULL, "nodes", 0, DB_BTREE,
                        create ? (DB_CREATE | DB_EXCL) : 0,
                        0666));
 
Index: subversion/libsvn_fs/fs.c
===================================================================
--- subversion/libsvn_fs/fs.c
+++ subversion/libsvn_fs/fs.c 2002-09-19 01:21:48.590003000 -0700
@@ -104,15 +104,6 @@
       *db_ptr = 0;
       db_err = db->close (db, 0);
 
- /* We can ignore DB_INCOMPLETE on db->close and db->sync; it
- * just means someone else was using the db at the same time
- * we were. See the Berkeley documentation at:
- * http://www.sleepycat.com/docs/ref/program/errorret.html#DB_INCOMPLETE
- * http://www.sleepycat.com/docs/api_c/db_close.html
- */
- if (db_err == DB_INCOMPLETE)
- db_err = 0;
-
       SVN_ERR (DB_WRAP (fs, msg, db_err));
     }
 
@@ -141,12 +132,6 @@
   {
     int db_err = env->txn_checkpoint (env, 0, 0, 0);
 
- while (db_err == DB_INCOMPLETE)
- {
- apr_sleep (APR_USEC_PER_SEC * 1);
- db_err = env->txn_checkpoint (env, 0, 0, 0);
- }
-
     /* If the environment was not (properly) opened, then txn_checkpoint
        will typically return EINVAL. Ignore this case.
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 19 11:23:11 2002

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