Simplify iprop update locking and avoid deadlock
authorGreg Hudson <ghudson@mit.edu>
Thu, 13 Feb 2014 00:13:43 +0000 (19:13 -0500)
committerGreg Hudson <ghudson@mit.edu>
Thu, 20 Feb 2014 20:55:48 +0000 (15:55 -0500)
commit444ef5fe9ec8d64a5db27b3a8aaf6813dd7ef0e0
tree2aa702a46a9ac7414a5e272b7cf6e73bf7f8c8bd
parentdba768e873d3ae34cfb2ff9d9c2d3644981f23a5
Simplify iprop update locking and avoid deadlock

Since we are no longer treating the update log like a journal (#7552),
we don't need two-stage update logging.  In kdb5.c, add an update log
entry after each DB change in one step, without getting an explicit
lock.  In kdb_log.c, combine ulog_add_update with ulog_finish_update,
and make ulog_add_update lock the ulog internally.

This change avoids deadlock by removing the only cases where the ulog
is locked before the DB.

ticket: 7861
src/include/kdb_log.h
src/lib/kdb/kdb5.c
src/lib/kdb/kdb_log.c