diff options
-rw-r--r-- | ctdb/client/client_db.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/ctdb/client/client_db.c b/ctdb/client/client_db.c index d95e89e5316..85d14e3fce3 100644 --- a/ctdb/client/client_db.c +++ b/ctdb/client/client_db.c @@ -326,13 +326,14 @@ static void ctdb_attach_mutex_done(struct tevent_req *subreq) mutex_enabled = 0; } - state->tdb_flags = TDB_DEFAULT; - if (! state->db->persistent) { - state->tdb_flags |= (TDB_INCOMPATIBLE_HASH | - TDB_CLEAR_IF_FIRST); - } - if (mutex_enabled == 1) { - state->tdb_flags |= TDB_MUTEX_LOCKING; + if (state->db->persistent) { + state->tdb_flags = TDB_DEFAULT; + } else { + state->tdb_flags = (TDB_NOSYNC | TDB_INCOMPATIBLE_HASH | + TDB_CLEAR_IF_FIRST); + if (mutex_enabled == 1) { + state->tdb_flags |= TDB_MUTEX_LOCKING; + } } if (state->db->persistent) { |