[SCM] CTDB repository - branch 1.0.114 updated - ctdb-1.0.114.5-4-gd85f7f1

Michael Adam obnox at samba.org
Fri Apr 5 09:33:54 MDT 2013


The branch, 1.0.114 has been updated
       via  d85f7f14572924ed45127964723f0924c3c20400 (commit)
       via  4aa1c2c55c4caaf7689df3138ab832bc068ed0af (commit)
       via  e64f9c5fdc91dbcf52099cc119ff5b6f3ced47cc (commit)
       via  8939a547a1d9df6653e4878b8127799962e2e9b7 (commit)
      from  44e540648477217e37ba43f664124e0996b4496b (commit)

http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=1.0.114


- Log -----------------------------------------------------------------
commit d85f7f14572924ed45127964723f0924c3c20400
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Nov 9 14:55:07 2011 +1100

    Fix typo in ctdb_ltdb_store_server()
    
    The if statement uses ret but means to use ret2.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    (cherry picked from commit f40101a615f8b9826a484e4697bfea6ee2b9ba88)

commit 4aa1c2c55c4caaf7689df3138ab832bc068ed0af
Author: Michael Adam <obnox at samba.org>
Date:   Tue Nov 20 11:20:34 2012 +0100

    ctdb:recover: fix a comment typo
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 5067392d2e06795559f25828b65c129608b65c0b)

commit e64f9c5fdc91dbcf52099cc119ff5b6f3ced47cc
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Nov 22 15:27:51 2012 +0100

    vacuum: Avoid some tallocs in ctdb recovery
    
    In a heavily loaded and volatile database a lot of SCHEDULE_FOR_DELETION
    requests can come in between fast vacuuming runs. This can lead to
    significant ctdb cpu load due to the cost of doing talloc_free. This
    reduces the number of objects a bit by coalescing the two objects
    of delete_record_data into one. It will also avoid having to allocate
    another talloc header for a SCHEDULE_FOR_DELETION key. Not the full fix
    for this problem, but it might contribute a bit.
    (cherry picked from commit 9a02f61547ddf74629aca21639d8fb61c1df7cbb)

commit 8939a547a1d9df6653e4878b8127799962e2e9b7
Author: Michael Adam <obnox at samba.org>
Date:   Fri Nov 16 14:33:41 2012 +0100

    vacuum: fix a comment typo
    
    Pair-Programmed-With: Volker Lendecke <vl at samba.org>
    Signed-off-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit bab744e3c49efef2e05dc09e8ea9bd3e3fa58716)

-----------------------------------------------------------------------

Summary of changes:
 server/ctdb_ltdb_server.c |    2 +-
 server/ctdb_recover.c     |    2 +-
 server/ctdb_vacuum.c      |   16 +++++++++-------
 3 files changed, 11 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/server/ctdb_ltdb_server.c b/server/ctdb_ltdb_server.c
index c65b35f..275f6c6 100644
--- a/server/ctdb_ltdb_server.c
+++ b/server/ctdb_ltdb_server.c
@@ -241,7 +241,7 @@ store:
 	if (schedule_for_deletion) {
 		int ret2;
 		ret2 = ctdb_local_schedule_for_deletion(ctdb_db, header, key);
-		if (ret != 0) {
+		if (ret2 != 0) {
 			DEBUG(DEBUG_ERR, (__location__ " ctdb_local_schedule_for_deletion failed.\n"));
 		}
 	}
diff --git a/server/ctdb_recover.c b/server/ctdb_recover.c
index e9e7659..537c4ea 100644
--- a/server/ctdb_recover.c
+++ b/server/ctdb_recover.c
@@ -354,7 +354,7 @@ static int traverse_pulldb(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data,
 }
 
 /*
-  pul a bunch of records from a ltdb, filtering by lmaster
+  pull a bunch of records from a ltdb, filtering by lmaster
  */
 int32_t ctdb_control_pull_db(struct ctdb_context *ctdb, TDB_DATA indata, TDB_DATA *outdata)
 {
diff --git a/server/ctdb_vacuum.c b/server/ctdb_vacuum.c
index 38e0c07..89e261a 100644
--- a/server/ctdb_vacuum.c
+++ b/server/ctdb_vacuum.c
@@ -93,6 +93,7 @@ struct delete_record_data {
 	struct ctdb_db_context *ctdb_db;
 	struct ctdb_ltdb_header hdr;
 	TDB_DATA key;
+	uint8_t keydata[1];
 };
 
 struct delete_records_list {
@@ -110,21 +111,22 @@ static int insert_delete_record_data_into_tree(struct ctdb_context *ctdb,
 {
 	struct delete_record_data *dd;
 	uint32_t hash;
+	size_t len;
 
-	dd = talloc_zero(tree, struct delete_record_data);
+	len = offsetof(struct delete_record_data, keydata) + key.dsize;
+
+	dd = (struct delete_record_data *)talloc_size(tree, len);
 	if (dd == NULL) {
 		DEBUG(DEBUG_ERR,(__location__ " Out of memory\n"));
 		return -1;
 	}
+	talloc_set_name_const(dd, "struct delete_record_data");
 
 	dd->ctdb      = ctdb;
 	dd->ctdb_db   = ctdb_db;
 	dd->key.dsize = key.dsize;
-	dd->key.dptr  = talloc_memdup(dd, key.dptr, key.dsize);
-	if (dd->key.dptr == NULL) {
-		DEBUG(DEBUG_ERR,(__location__ " Out of memory\n"));
-		return -1;
-	}
+	dd->key.dptr  = dd->keydata;
+	memcpy(dd->keydata, key.dptr, key.dsize);
 
 	dd->hdr = *hdr;
 
@@ -675,7 +677,7 @@ static int ctdb_process_vacuum_fetch_lists(struct ctdb_db_context *ctdb_db,
 }
 
 /**
- * Proces the delete list:
+ * Process the delete list:
  * Send the records to delete to all other nodes with the
  * try_delete_records control.
  */


-- 
CTDB repository


More information about the samba-cvs mailing list