[SCM] CTDB repository - branch 1.0.69 updated - 3848f8a8f809bf3eb5d6818b62b6e4af967348ad

Andrew Tridgell tridge at samba.org
Tue May 5 22:19:56 GMT 2009


The branch, 1.0.69 has been updated
       via  3848f8a8f809bf3eb5d6818b62b6e4af967348ad (commit)
       via  54c5cfe8659a49054659a693098c0fba4fdf76cd (commit)
       via  9a00035c9c815736d0a5909dfc4de7f4c3ac41d4 (commit)
      from  8ae93da7f6341f1cddb15786df67644f29648b9b (commit)

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


- Log -----------------------------------------------------------------
commit 3848f8a8f809bf3eb5d6818b62b6e4af967348ad
Author: Andrew Tridgell <tridge at samba.org>
Date:   Wed May 6 08:18:21 2009 +1000

    use less intrusive smbstatus call in periodic connections cleanup

commit 54c5cfe8659a49054659a693098c0fba4fdf76cd
Author: root <root at rcn1.VSOFS1.COM>
Date:   Wed May 6 07:30:36 2009 +1000

    change the control opcode number for transaction_kill so it will not conflict with newer controls in the master branch

commit 9a00035c9c815736d0a5909dfc4de7f4c3ac41d4
Author: root <root at rcn1.VSOFS1.COM>
Date:   Tue May 5 16:33:21 2009 +1000

    change the talloc hierarchy for the main transaction_start context and the individual transaction_all handles

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

Summary of changes:
 config/events.d/50.samba |    2 +-
 include/ctdb_private.h   |    2 +-
 server/ctdb_traverse.c   |   11 +++--------
 3 files changed, 5 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/50.samba b/config/events.d/50.samba
index 9ec5f1c..2040f9d 100755
--- a/config/events.d/50.samba
+++ b/config/events.d/50.samba
@@ -109,7 +109,7 @@ periodic_cleanup() {
     # running smbstatus scrubs any dead entries from the connections
     # and sessionid database
     # echo "Running periodic cleanup of samba databases"
-    smbstatus -n > /dev/null 2>&1 &
+    smbstatus -np > /dev/null 2>&1 &
 }
 
 case $cmd in 
diff --git a/include/ctdb_private.h b/include/ctdb_private.h
index e14a272..7439ada 100644
--- a/include/ctdb_private.h
+++ b/include/ctdb_private.h
@@ -565,7 +565,7 @@ enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS          = 0,
 		    CTDB_CONTROL_TAKEOVER_IP             = 89,
 		    CTDB_CONTROL_GET_PUBLIC_IPS          = 90,
 		    CTDB_CONTROL_GET_NODEMAP             = 91,
-		    CTDB_CONTROL_TRAVERSE_KILL		 = 92,
+		    CTDB_CONTROL_TRAVERSE_KILL		 = 97,
 };	
 
 /*
diff --git a/server/ctdb_traverse.c b/server/ctdb_traverse.c
index 60a8e90..dbb4b4f 100644
--- a/server/ctdb_traverse.c
+++ b/server/ctdb_traverse.c
@@ -92,7 +92,6 @@ static int ctdb_traverse_local_fn(struct tdb_context *tdb, TDB_DATA key, TDB_DAT
 	struct ctdb_rec_data *d;
 	struct ctdb_ltdb_header *hdr;
 
-	
 	hdr = (struct ctdb_ltdb_header *)data.dptr;
 
 	if (h->ctdb_db->persistent == 0) {
@@ -229,10 +228,10 @@ static void ctdb_traverse_all_timeout(struct event_context *ev, struct timed_eve
 {
 	struct ctdb_traverse_all_handle *state = talloc_get_type(private_data, struct ctdb_traverse_all_handle);
 
+	DEBUG(DEBUG_ERR,(__location__ " Traverse all timeout on database:%s\n", state->ctdb_db->db_name));
 	state->ctdb->statistics.timeouts.traverse++;
 
 	state->callback(state->private_data, tdb_null, tdb_null);
-	talloc_free(state);
 }
 
 
@@ -265,7 +264,7 @@ static struct ctdb_traverse_all_handle *ctdb_daemon_traverse_all(struct ctdb_db_
 	struct ctdb_traverse_all r;
 	uint32_t destination;
 
-	state = talloc(ctdb_db, struct ctdb_traverse_all_handle);
+	state = talloc(start_state, struct ctdb_traverse_all_handle);
 	if (state == NULL) {
 		return NULL;
 	}
@@ -450,11 +449,6 @@ int32_t ctdb_control_traverse_data(struct ctdb_context *ctdb, TDB_DATA data, TDB
 	private_data = state->private_data;
 
 	callback(private_data, key, data);
-	if (key.dsize == 0 && data.dsize == 0) {
-		/* we've received all of the null replies, so all
-		   nodes are finished */
-		talloc_free(state);
-	}
 	return 0;
 }	
 
@@ -495,6 +489,7 @@ static int ctdb_traverse_start_destructor(struct traverse_start_state *state)
 	struct ctdb_traverse_start r;
 	TDB_DATA data;
 
+	DEBUG(DEBUG_ERR,(__location__ " Traverse cancelled by client disconnect for database:0x%08x\n", state->db_id));
 	r.db_id = state->db_id;
 	r.reqid = state->reqid;
 	r.srvid = state->srvid;


-- 
CTDB repository


More information about the samba-cvs mailing list