when ctdb attaches to a database it broadcasts the attach to all other
authorRonnie Sahlberg <sahlberg@ronnie>
Fri, 21 Sep 2007 03:47:40 +0000 (13:47 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Fri, 21 Sep 2007 03:47:40 +0000 (13:47 +1000)
nodes so that the db is created on them as well

when we send this broadcast   we must use the correct control and not
assume all databases created are of the temporary kind

server/ctdb_ltdb_server.c

index 6232fbcae1a5b1b195bdac44cbdbf8473c2e735e..862d5bb53dd64385fbda70930d4c9eaf265538ca 100644 (file)
@@ -332,7 +332,9 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
 
        /* tell all the other nodes about this database */
        ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_ALL, 0,
-                                CTDB_CONTROL_DB_ATTACH, 0, CTDB_CTRL_FLAG_NOREPLY,
+                                persistent?CTDB_CONTROL_DB_ATTACH_PERSISTENT:
+                                               CTDB_CONTROL_DB_ATTACH,
+                                0, CTDB_CTRL_FLAG_NOREPLY,
                                 indata, NULL, NULL);
 
        /* success */