kadmin incremental propagation full resync multiple processes spawned
Paul B. Henson
henson at acm.org
Fri Nov 4 18:03:36 EDT 2011
On 11/4/2011 1:40 PM, Tom Yu wrote:
> I think it should be possible to do something using alarm() to provide
> timeouts for lock acquisition, but that wouldn't work well inside a
> library.
As I understand it, the issue is that there is no "get a lock, wait in
line if it's not available" call. If such a call did exist, it would
need a timeout value to limit how long it would wait. But the current
call simply returns immediately, either with the lock, or without it. If
you didn't get it, your only choice is to try and get it again. However,
if it does become free, there's nothing keeping someone else from
jumping in and grabbing it before you have the chance to try again. The
current approach tries five times with a 1 second delay in between tries
to get the lock, then gives up. If somebody else (in this case kadmind)
is also busily grabbing the lock, and sitting on it, the odds of you
getting in to get it aren't necessarily that good.
Barring a better lock API, the only other little choice is to try more
times and perhaps wait less in between tries. I suppose you could spin
on it, continuously trying to get the lock for a certain interval, but
that would be a bit inefficient.
--
Paul B. Henson | (909) 979-6361 | http://www.csupomona.edu/~henson/
Operating Systems and Network Analyst | henson at csupomona.edu
California State Polytechnic University | Pomona CA 91768
More information about the Kerberos
mailing list