]> git.ipfire.org Git - thirdparty/krb5.git/commit
Avoid unnecessary iprop full resyncs after resets 270/head
authorGreg Hudson <ghudson@mit.edu>
Thu, 9 Apr 2015 18:23:07 +0000 (14:23 -0400)
committerGreg Hudson <ghudson@mit.edu>
Mon, 13 Apr 2015 22:03:11 +0000 (18:03 -0400)
commit0a8d39d8c4cbe0539343b44a9a1ebaebe9d1b363
tree217e59f900568b29955f0845e6f72067fb694661
parentfa76eebe09c09063b64715da4b7bcb7a969848da
Avoid unnecessary iprop full resyncs after resets

When resetting the ulog header or initializing it from a dump file
kdb_last_t value, instead of setting kdb_num to 0, create a dummy
entry for the last_sno value so that we can remember its timestamp.
With this change, a slave no longer needs to perform two full resyncs
after an upstream header initialization.  Dummy entries are never
transmitted to downstream slaves because the iprop protocol never
transmits the kdb_first_sno update; if one is somehow transmitted, the
slave will ignore it because it doesn't have the kdb_commit flag set.

reset_header() is renamed to reset_ulog(), takes a kdb_log_context
parameter, and is responsible for syncing the header.  sync_update()
now returns void and aborts if msync() fails, just like sync_header().
A new helper set_dummy() writes a dummy entry and sets the ulog to
point to it.

Adjust kproplog to recognize and display dummy entries.  Adjust
t_ulog.c and t_iprop.py for the new behavior.  In t_iprop.py, remove a
kpropd -t test which became redundant with the previous test.

ticket: 8164 (new)
src/lib/kdb/kdb_log.c
src/lib/kdb/t_ulog.c
src/slave/kproplog.c
src/tests/t_iprop.py