return dbwrap_db_id(ctx->backend, id, idlen);
}
+void dbwrap_watched_wakeup(struct db_record *rec)
+{
+ struct db_watched_subrec *subrec = NULL;
+
+ if (rec->storev == dbwrap_watched_do_locked_storev) {
+ struct dbwrap_watched_do_locked_state *state =
+ rec->private_data;
+ subrec = &state->subrec;
+ } else {
+ subrec = talloc_get_type_abort(
+ rec->private_data, struct db_watched_subrec);
+ }
+
+ dbwrap_watched_subrec_wakeup(rec, subrec);
+}
+
struct db_context *db_open_watched(TALLOC_CTX *mem_ctx,
struct db_context **backend,
struct messaging_context *msg)
bool *blockerdead,
struct server_id *blocker);
+/*
+ * Wake up watchers without having modified the record value. One
+ * usecase at the time of this commit is: We have lease break waiters
+ * waiting on a locking.tdb record. They should be woken up when a
+ * lease is broken, which does not modify the locking.tdb record.
+ */
+void dbwrap_watched_wakeup(struct db_record *rec);
+
#endif /* __DBWRAP_WATCH_H__ */