[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Namespace Caching
Date: Fri, 3 Feb 89 15:55 EST
From: Crawley@alderaan.scrc.symbolics.com (Eric S. Crawley)
Date: Fri, 3 Feb 89 09:02 PST
From: York@Chuck-Jones.ILA-West.Dialnet.Symbolics.COM (William M. York)
Date: Thu, 2 Feb 89 18:18 EST
From: Crawley@ALDERAAN.SCRC.Symbolics.COM (Eric S. Crawley)
Date: Thu, 2 Feb 89 14:15:01 PST
From: saus@venera.isi.edu (Mark Sausville)
How many times has it happened? You need a host in your namespace.
The guy with the nameserver puts it in the namespace. Your machine,
since it already asked the nameserver without success, decides that it
need never ask again.
:Reset Network is simple and usually does the trick. If you want to
always check with the namespace server for everything, you could set
neti:*validate-once-per-boot* to nil. This is set to T by default.
For small sites, setting this flag to NIL may simplify life by making
sure that all hosts always have the most up-to-date namespace info.
For large sites, the potential burden on the namespace server (and the
time spent by all the other hosts waiting for validity checks) argues
for a setting of T.
Correct.
A less drastic method would be to do
(neti:reset-all-host-availabilities) to make the namespace server
available if it had been inaccessible followed by
(neti:reset-all-namespace-access-paths) to reset any cached paths to the
namespace server. This should reset things enough that :Show Namespace
Object should be able to find the object.
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".
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.
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
- Follow-Ups:
- Namespace Caching
- From: "Eric S. Crawley" <Crawley%alderaan.scrc.symbolics.com@RELAY.CS.NET>
- References:
- Namespace Caching
- From: "Eric S. Crawley" <Crawley%alderaan.scrc.symbolics.com@RELAY.CS.NET>