diff options
author | Nicolas Williams <nico@cryptonector.com> | 2012-08-17 18:19:31 -0500 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2012-10-05 13:54:20 -0400 |
commit | 4fd4144b3222b060f3e9928a9cb4587df9979539 (patch) | |
tree | d0260c405fd3dc1e41976dc4e9cc7d5193d011ba /src/lib | |
parent | 0d4f7d520f269c034c639f5b382b9f009848f482 (diff) | |
download | krb5-4fd4144b3222b060f3e9928a9cb4587df9979539.tar.gz krb5-4fd4144b3222b060f3e9928a9cb4587df9979539.tar.xz krb5-4fd4144b3222b060f3e9928a9cb4587df9979539.zip |
Use a single global dump for iprop full syncs
Use a global dump (the default dump file) for full syncs for iprop.
When a slave asks for a fullsync we kprop the existing global dump to it
if that is good enough, else we dump the DB and send the new global
dump.
Before this change kadmind would run kdb5_util dump -i... each time a
slave asked for a full dump. This was done in a sub-process,
thankfully, but it was still a waste of time and storage (e.g., if one
has a huge KDB).
Also, long dump times might cause a slave to give up (the timeout for
this is now configurable). But since iprop dumps bear a serial number
and timestamp and since slaves will resync from that point forward, it
doesn't matter if the dump we send a slave is fresh as long as it is
fresh enough (i.e., that its sno and timestamp are in the ulog).
Also:
- Rename dumps into place instead of unlink, create, write (but we
still keep the dump ok files as lock files and as a method of
signaling to kprop that the dump is complete).
ticket: 7371
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/kdb/kdb_log.c | 2 | ||||
-rw-r--r-- | src/lib/kdb/libkdb5.exports | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/kdb/kdb_log.c b/src/lib/kdb/kdb_log.c index 0153375ea7..dc994dde16 100644 --- a/src/lib/kdb/kdb_log.c +++ b/src/lib/kdb/kdb_log.c @@ -89,7 +89,7 @@ ulog_sync_update(kdb_hlog_t *ulog, kdb_ent_header_t *upd) /* * Sync memory to disk for the update log header. */ -static void +void ulog_sync_header(kdb_hlog_t *ulog) { diff --git a/src/lib/kdb/libkdb5.exports b/src/lib/kdb/libkdb5.exports index 9aa8d1a4ad..43a361d0c4 100644 --- a/src/lib/kdb/libkdb5.exports +++ b/src/lib/kdb/libkdb5.exports @@ -88,6 +88,7 @@ krb5_db_promote ulog_map ulog_set_role ulog_free_entries +ulog_sync_header xdr_kdb_last_t xdr_kdb_incr_result_t xdr_kdb_fullresync_result_t |