avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: AvroTypeException thrown with version change on optional record
Date Wed, 07 Dec 2011 23:07:35 GMT
On 12/07/2011 02:55 PM, Francois Forster wrote:
> I'm trying to test the case where a server returns a newer version of a response to make
sure an older client can read it.
> I think I can accomplish that by removing the version out of the namespace altogether
in my test case.

Yes, for bi-directional compatibility you should not change the
namespace or the name of your records.  Also it's best to specify a
default value for fields.  If you add a new field these will be used
when reading old data.  If you remove a field and read newer data using
the old schema then the default would be used.


View raw message