[OPEN-ILS-DEV] IDL is not backward compatible?

Ken Cox kenstir at gmail.com
Mon Feb 18 18:12:17 EST 2019


I think I know what is going on, but I would like somebody to confirm
my understanding.

After a server upgrade from 3.0.1 to 3.2.2, I saw a significant spike
the iOS app crashes.  It looks like a cached IDL specifies fewer
fields than is returned by the /osrf-gateway-v1 endpoint.

I fixed the app so that does not cause a crash, reasoning that since
the IDL fields must be newly added fields, and because the app didn't
require them, I could safely ignore them.  On deeper inspection, it
looks as though new fields have been added to the middle of IDL
classes.  For instance, the class 'au' had the following new fields
added, all in the middle:
* Privacy Waiver Entries
* Preferred Prefix
* Preferred First Name
...

Short term, I think a partial fix is to disable caching of the IDL,
even though the server indicates it can be cached:

    HTTP/1.1 200 OK
    Date: Mon, 18 Feb 2019 09:27:03 GMT
    Cache-Control: max-age=31536000
    Expires: Tue, 18 Feb 2020 09:27:03 GMT

Long term, I think a better approach would be to add new fields only
at the end.  This is a common technique for maintaining binary
compatibility in compiled code.  If the app is suspended during a
server upgrade, and if fields are added in the middle, then the IDL is
out of sync, right?  Or maybe, all sessions are lost during the down
time and the next request with an auth token will fail, and the IDL
should be loaded on every login?  (Sorry I have been trying to test
this hypothesis but I am having trouble upgrading my own EG server).

Thanks,
Ken


More information about the Open-ils-dev mailing list