ctdb-daemon: Store tdb flags just after tdb is opened in ctdb_local_attach()
authorAmitay Isaacs <amitay@gmail.com>
Thu, 2 Mar 2017 03:52:00 +0000 (14:52 +1100)
committerMartin Schwenke <martins@samba.org>
Mon, 26 Jun 2017 13:47:24 +0000 (15:47 +0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/server/ctdb_ltdb_server.c

index 8a364fe4894ca74d3e08764e6cbe0f7631ab2874..6ae92f52a97a96296ce34e5cfaec01c8e7d626fb 100644 (file)
@@ -960,6 +960,10 @@ again:
                }
        }
 
+       /* remember the flags the client has specified */
+       tdb_add_flags(ctdb_db->ltdb->tdb, tdb_flags);
+
+
        /* set up a rb tree we can use to track which records we have a 
           fetch-lock in-flight for so we can defer any additional calls
           for the same record.
@@ -1214,9 +1218,6 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
                return -1;
        }
 
-       /* remember the flags the client has specified */
-       tdb_add_flags(db->ltdb->tdb, tdb_flags);
-
        outdata->dptr  = (uint8_t *)&db->db_id;
        outdata->dsize = sizeof(db->db_id);