summaryrefslogtreecommitdiff
path: root/source4/wrepl_server/wrepl_server.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-12-22 11:40:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:38 -0500
commitc05019a04bbfc882092a55f8e97682abd2c3ec8b (patch)
treed3cf8ddabd5b7e9e870368c6bebf0aab1786c3ed /source4/wrepl_server/wrepl_server.h
parent61669aadc91b62c25fa45d6af82de3f0028465b8 (diff)
downloadsamba-c05019a04bbfc882092a55f8e97682abd2c3ec8b.tar.gz
samba-c05019a04bbfc882092a55f8e97682abd2c3ec8b.tar.bz2
samba-c05019a04bbfc882092a55f8e97682abd2c3ec8b.zip
r12434: implement database scavenging, the only missing part is the verifying of active replicas
with the owning wins server, after the verify interval passes. metze (This used to be commit 7d1f7ae9c65c09f8bf72e159b771f231f96e8591)
Diffstat (limited to 'source4/wrepl_server/wrepl_server.h')
-rw-r--r--source4/wrepl_server/wrepl_server.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/source4/wrepl_server/wrepl_server.h b/source4/wrepl_server/wrepl_server.h
index 56751b6f29..125e04b84c 100644
--- a/source4/wrepl_server/wrepl_server.h
+++ b/source4/wrepl_server/wrepl_server.h
@@ -209,6 +209,9 @@ struct wreplsrv_service {
/* the whole wrepl service is in one task */
struct task_server *task;
+ /* the time the service was started */
+ struct timeval startup_time;
+
/* the winsdb handle */
struct ldb_context *wins_db;
@@ -232,17 +235,32 @@ struct wreplsrv_service {
/*
* the interval (in secs) a record remains in TOMBSTONE state,
* before it will be removed from the database.
+ * See also 'tombstone_extra_timeout'.
* (also known as extinction timeout)
*/
uint32_t tombstone_timeout;
/*
+ * the interval (in secs) a record remains in TOMBSTONE state,
+ * even after 'tombstone_timeout' passes the current timestamp.
+ * this is the minimum uptime of the wrepl service, before
+ * we start delete tombstones. This is to prevent deletion of
+ * tombstones, without replacte them.
+ */
+ uint32_t tombstone_extra_timeout;
+
+ /*
* the interval (in secs) till a replica record will be verified
* with the owning wins server
*/
uint32_t verify_interval;
/*
+ * the interval (in secs) till a do a database cleanup
+ */
+ uint32_t scavenging_interval;
+
+ /*
* the interval (in secs) to the next periodic processing
* (this is the maximun interval)
*/
@@ -269,4 +287,18 @@ struct wreplsrv_service {
/* here we have a reference to the timed event the schedules the periodic stuff */
struct timed_event *te;
} periodic;
+
+ /* some stuff for scavenging processing */
+ struct {
+ /*
+ * the timestamp for the next scavenging run,
+ * this is the timstamp passed to event_add_timed()
+ */
+ struct timeval next_run;
+
+ /*
+ * are we currently inside a scavenging run
+ */
+ BOOL processing;
+ } scavenging;
};