This is realized by adding a ctdb_ltdb_store_fn function pointer to the db
context and filling it in the attach procedure for non-persistent dbs.
int ret;
bool seqnum_suppressed = false;
+ if (ctdb_db->ctdb_ltdb_store_fn) {
+ return ctdb_db->ctdb_ltdb_store_fn(ctdb_db, key, header, data);
+ }
+
if (ctdb->flags & CTDB_FLAG_TORTURE) {
struct ctdb_ltdb_header *h2;
rec = tdb_fetch(ctdb_db->ltdb->tdb, key);
struct lockwait_handle *lockwait_overflow;
struct ctdb_persistent_state *persistent_state;
struct trbt_tree *delete_queue;
+ int (*ctdb_ltdb_store_fn)(struct ctdb_db_context *ctdb_db,
+ TDB_DATA key,
+ struct ctdb_ltdb_header *header,
+ TDB_DATA data);
+
};
if (ctdb_db->delete_queue == NULL) {
CTDB_NO_MEMORY(ctdb, ctdb_db->delete_queue);
}
+
+ ctdb_db->ctdb_ltdb_store_fn = ctdb_ltdb_store_server;
}
/* check for hash collisions */