Fix issue where master HDB can be locked while waiting for network I/O.
commit539ba5fb8751d7c8741c89e99645775f131ba4fe
authorRoland C. Dowdeswell <elric@imrryr.org>
Wed, 6 Jun 2012 21:29:03 +0000 (6 22:29 +0100)
committerRoland C. Dowdeswell <elric@imrryr.org>
Wed, 6 Jun 2012 21:29:03 +0000 (6 22:29 +0100)
treedc0b247f37f0d0527631fb0b6c8db5f19d9bdd4f
parent5e081aa4a623ba16fd66449d7a7722e66c3c98d8
Fix issue where master HDB can be locked while waiting for network I/O.

We should not hold locks on the master's database while waiting
for network I/O which may take a terribly long time to complete as
this will block out all writers and could therefore be slightly
problematic.  ipropd-master was holding a shared lock on the database
while sending a complete propation to slaves which are out of sync
with the log file.  We fix this by writing what we intend to send
in record format into a file hdb_db_dir()/ipropd.dumpfile while
holding a shared lock on the database and then we send the contents
of the file after releasing the lock.  We also save and re-use the file
that we generated during future complete propagation events as long
as the log is long enough to get us back to the state previously
dumped.
lib/kadm5/ipropd_master.c