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/include | |
| 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/include')
| -rw-r--r-- | src/include/kdb_log.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/kdb_log.h b/src/include/kdb_log.h index 51648c7e8..beecdc124 100644 --- a/src/include/kdb_log.h +++ b/src/include/kdb_log.h @@ -108,6 +108,8 @@ typedef struct kdb_hlog { uint16_t kdb_block; /* Block size of each element */ } kdb_hlog_t; +extern void ulog_sync_header(kdb_hlog_t *); + typedef struct kdb_ent_header { uint32_t kdb_umagic; /* Update entry magic # */ kdb_sno_t kdb_entry_sno; /* Serial # of entry */ |
