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

Namespace Caching



    Date: Fri, 3 Feb 89 17:38 EST
    From: barmar@Think.COM (Barry Margolin)

	Date: Fri, 3 Feb 89 15:55 EST
	From: Crawley@alderaan.scrc.symbolics.com (Eric S. Crawley)

[...]
	    Actually, Show Namespace Object does an explicit :check-validity first
	    (unless you tell it not to), so simply doing a Show Namespace Object of
	    the new host is enough to get the most recent information.  Right?

    Wrong.  Yes, Show Namespace Object does an explicit :CHECK-VALIDITY, but
    the argument parser won't let you type the name of a host that is known
    not to exist.  So, once the nonexistence of FOOBAR is cached, you can't
    type "Show Namespace Object FOOBAR".

Yes, you're right.  I sometimes forget about all the "wonders" of
presentations.

	    Similarly, you could evaluate:

	    (send (net:find-object-named :host "foobar") :check-validity nil t)

	    to get the latest info from the namespace server.

    Nope.  NET:FIND-OBJECT-NAMED will signal an error if FOOBAR is known not
    to exist.

	This normally works.  However, if you were unable to access the
	namespace server previously, the availability mechanism may have marked
	the namespace server as unavailable so it would not bother trying to
	contact it when doing the :check-validity.  This is when
	reset-all-host-availabilities and reset-all-namespace-access-paths
	are effective.

    But who said you were unable to access the namespace server?  Reread the
    original problem statement: you accessed the server, but at that time
    the host didn't exist.  Then the administrator defined the host, but
    your machine already had the nonexistence cached.

Yes, that is true.  I have found that the problem is more often with the
accessibility of the namespace server.  But your example below is
correct in the general case.  I was being brain-damaged to only focus on
the problem of accessibility.

    Barring problems accessing the namespace server, I believe the following
    is a good way to do it:

    (let ((neti:*validate-once-per-boot* nil) ;; ask the server again
	  ;; Even the above doesn't force a server query on every operation.
	  ;; The following specifies the number of 60ths of a second between
	  ;; asking the server for the namespace timestamp, and setting it
	  ;; this small forces a query.
	  (neti:*check-namespace-validity-time* 1))
      (send (net:find-object-named :host "foobar") :check-validity nil t))

						    barmar