ReadOnly: Only restrict the readonly sanity/paranoia check that only allows
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 12 Mar 2012 02:13:51 +0000 (13:13 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 12 Mar 2012 02:13:51 +0000 (13:13 +1100)
UPDATE_RECORD to create a record to only apply to normal databases, not
persistent databases or else the net registry command breaks
and other persistent database creation/updates .

(This used to be ctdb commit 68390cb1e8c7f30be034b8ca6c9215b40147305b)

ctdb/server/ctdb_update_record.c

index f8be8e88c472e360455c728bf6fca527d4dcdecf..a4a6fc41a1de1e147a008f731c0c5ac1234d4c4d 100644 (file)
@@ -325,7 +325,10 @@ int32_t ctdb_control_update_record(struct ctdb_context *ctdb,
        state->ctdb_db = ctdb_db;
        state->c       = c;
        state->m       = m;
-       state->flags   = UPDATE_FLAGS_REPLACE_ONLY;
+       state->flags   = 0;
+       if (!ctdb_db->persistent) {
+               state->flags   = UPDATE_FLAGS_REPLACE_ONLY;
+       }
 
        /* create a child process to take out a transaction and
           write the data.