Rev 690: quick fix for timeout in recovery in http://samba.org/~tridge/ctdb

tridge at samba.org tridge at samba.org
Wed Jan 2 01:04:08 GMT 2008


------------------------------------------------------------
revno: 690
revision-id:tridge at samba.org-20080102010407-sfzw6pliegl3iwf7
parent: tridge at samba.org-20071226231909-oyysv0l4g5ytadjv
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge.kantana
timestamp: Wed 2008-01-02 12:04:07 +1100
message:
  quick fix for timeout in recovery
modified:
  lib/tdb/common/freelist.c      freelist.c-20070220022425-m1wibgjq7n5hahs6-4
  lib/tdb/common/io.c            io.c-20070220022425-m1wibgjq7n5hahs6-6
  tests/start_daemons.sh         start_daemons.sh-20070604074603-fbb8x90srun04xn0-1
=== modified file 'lib/tdb/common/freelist.c'
--- a/lib/tdb/common/freelist.c	2007-07-10 05:32:27 +0000
+++ b/lib/tdb/common/freelist.c	2008-01-02 01:04:07 +0000
@@ -295,12 +295,7 @@
 				bestfit.rec_len = rec->rec_len;
 				bestfit.rec_ptr = rec_ptr;
 				bestfit.last_ptr = last_ptr;
-				/* consider a fit to be good enough if
-				   we aren't wasting more than half
-				   the space */
-				if (bestfit.rec_len < 2*length) {
-					break;
-				}
+				break;
 			}
 		}
 

=== modified file 'lib/tdb/common/io.c'
--- a/lib/tdb/common/io.c	2007-07-10 05:32:27 +0000
+++ b/lib/tdb/common/io.c	2008-01-02 01:04:07 +0000
@@ -261,9 +261,9 @@
 	/* must know about any previous expansions by another process */
 	tdb->methods->tdb_oob(tdb, tdb->map_size + 1, 1);
 
-	/* always make room for at least 10 more records, and round
+	/* always make room for at least 100 more records, and round
            the database up to a multiple of the page size */
-	size = TDB_ALIGN(tdb->map_size + size*10, tdb->page_size) - tdb->map_size;
+	size = TDB_ALIGN(tdb->map_size + size*100, tdb->page_size) - tdb->map_size;
 
 	if (!(tdb->flags & TDB_INTERNAL))
 		tdb_munmap(tdb);

=== modified file 'tests/start_daemons.sh'
--- a/tests/start_daemons.sh	2007-11-12 23:28:06 +0000
+++ b/tests/start_daemons.sh	2008-01-02 01:04:07 +0000
@@ -6,7 +6,6 @@
 fi
 NODES="nodes.txt"
 shift
-shift
 
 rm -f nodes.txt
 for i in `seq 1 $NUMNODES`; do



More information about the samba-cvs mailing list