[krbdev.mit.edu #7855] git commit

Greg Hudson via RT rt-comment at krbdev.mit.edu
Thu Feb 20 21:25:34 EST 2014


Maintain complete ulog on iprop slaves

Factor out most of ulog_add_update into a helper function named
store_update, and make ulog_add_update just responsible for assigning
a serial number and timestamp to the update before storing it.  In
ulog_replay, use store_update and ulog_finish_update to add each
update to the ulog in addition to replaying it to the database.  Don't
use incr_ret->lastentry to set kdb_last_sno/kdb_last_time, since it
will have been set properly by adding the individual updates; instead,
just reinitialize the ulog on error.

Slave ulogs use serial numbers provided from upstream, and thus do not
always begin at serial number 1 after a header reset.  As a result, we
must: (A) in store_update, detect the first update (for which we must
assign kdb_first_sno/kdb_first_time) by comparing kdb_num to 0,
instead of by comparing the serial number to 1; (B) in store_update,
detect that we are overwriting the first update by comparing kdb_num
to ulogentries, instead of comparing the serial number to ulogentries;
and (C) in ulog_map, detect that ulogentries changed by verifying the
first and last serial number and timestamp against the actual ulog
entries, rather than simply comparing kdb_last_sno to kdb_num.

Based on code submitted by Richard Basch.

https://github.com/krb5/krb5/commit/406c83c835a8ce062d798a2ec4eda2eddd088450
Author: Greg Hudson <ghudson at mit.edu>
Commit: 406c83c835a8ce062d798a2ec4eda2eddd088450
Branch: master
 src/lib/kdb/kdb_log.c |  148 ++++++++++++++++++++++++-------------------------
 1 files changed, 73 insertions(+), 75 deletions(-)



More information about the krb5-bugs mailing list