[AFS3-std] XCB union decoding (was Re: Encoding IPvN addresses)

Andrew Deason adeason@sinenomine.net
Fri, 11 Feb 2011 11:12:58 -0600


On Fri, 11 Feb 2011 11:43:43 -0500 (EST)
"Matt W. Benjamin" <matt@linuxbox.com> wrote:

> XCB is structured as a "bulk" interface.  Clients receive a sequence
> (actually sequences) of messages, where the messages are in the union
> (ditto for results).  I understood the interesting case to be if a
> client receives a sequence of callbacks of intermixed known and known
> type.  I would expect clients to ignore unknown messages, but I guess
> the point at issue is whether a sequence containing unexpected union
> records can even be decoded.  Can it? 

Currently, no. But with the new union structure, yes. (And you could
even have the application handle the unknown 'blob', if we allow the
application to install a handler for an unknown discriminator, as jhutz
has mentioned)

But in that situation with XCB, if you get an unknown callback type,
there's not anything you can do with it, so the only thing I can see
happening is that you drop it. And so, you've dropped a callback break,
which means losing information or keeping stale data around in the
cache. I would expect that the fileserver be told that a client doesn't
understand a certain callback type, and so would have to work around it
(probably by sending a Cancelled or something).

-- 
Andrew Deason
adeason@sinenomine.net