Skip Menu |

Subject: git commit
Download (untitled) / with headers
text/plain 1.4KiB

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 for the new behavior. In, remove a
kpropd -t test which became redundant with the previous test.
Author: Greg Hudson <>
Commit: 0a8d39d8c4cbe0539343b44a9a1ebaebe9d1b363
Branch: master
src/lib/kdb/kdb_log.c | 77 ++++++++++++++++---------
src/lib/kdb/t_ulog.c | 6 +-
src/slave/kproplog.c | 16 ++++--
src/tests/ | 153 ++++++++++++++++++++++--------------------------
4 files changed, 133 insertions(+), 119 deletions(-)