Re: oaf time stamp problem



On Thu, 26 Oct 2000, Troy D . Gillette wrote:

> OK, I've pinned it down, but am not sure on one point.
> 
> The problem occurs because of the oaf_naming_service. When I call
> oaf_init() and then oaf_activate(), the oaf child variable gets time stamped
> and the oaf_naming_service gets added as an active server.
> 
> This is fine, except that it is rapidly followed by my own
> oaf_active_server_register() call. Which usually happens within the same
> second, and therefore DOESN'T get added to the child's active_servers list.
> 
> So any calls to check if that server is active will fail until another server
> gets registered, causing the list to get updated again.

Oh yuck, this is a nasty one. 

Two ways to solve it:
	- Use more precise timestamps
	- Switch from using a timestamp to using some sort of unique ID
	number that will change every time the _active state of a server
	in the OD changes.

The latter solution is totally race-condition-free. Main decider is
whether we will need actual time info in any other place.

> My question is... What starts oaf_naming_service?

It is started & registered as part of oafd startup.

-- Elliot
[ "In a democracy, the government is the people," Milo explained. "We're people,
aren't we? So we might just as well keep the money and eliminate the middleman." ]
							- Catch-22





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]