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.
similar to commit
df49ec44de80affa5ccc637dec12a20a26e8706e.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
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 ctdb_vacuum_handle *vacuum_handle;
char *unhealthy_reason;
struct _trbt_tree_t *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 */