James E. Blair ffb548f367 Add upgrade handling for new zkobject sharding
Change I513976a703f035545eaf5bd05a381dbc0c509cda updated the format
for zkobjects.  The old format chunks the data and then compresses
each chunk with zlib; the new format compressed the entire data then
chunks the compressed data.  The change did not take into account
the leading and trailing zlib metadata for each chunk.

To correct this, we will add a model api revision so that we can
know whether we should write the old or new formats.  As for reading,
we will always assume the new format to start, but on the second
shard, we will check for a zlib header, and if we find it, we will
switch to reading the old format.  This will allow us to support
reading old data for some time after the upgrade.

For any systems that have already upgraded between the previous
commit and this one, if they haven't encountered problems, then
they are likely able to store data without sharding; the old and
new data formats for a single shard are identical, so some flapping
between the old and new versions on the "write" side during the
model upgrade is unlikely to cause long-term problems.

Change-Id: Ic44d340685bbaf79c43d4ca4848536bd33b26ed3
Co-Authored-By: Simon Westphahl <simon.westphahl@bmw.de>
2024-07-31 10:53:35 -07:00
..
2013-01-15 18:35:53 +00:00
2023-08-31 08:55:59 -07:00