MB-19948 identified an invalid read of 1 byte when reading metadata written by the 3.x series.
In 4.x an extra byte is read from metadata and treated as the conflict resolution mode. There are two valid values (0 and 1) however because of the invalid read we may be creating Items in the hash-table with an arbitrary value (which could then be stored back to disk).
The basic issue is that any item on disk could have an illegal conflict-resolution mode and we need to code around this.
Luckily at the moment conflict resolution mode is not actually utilised, but we need to handle future upgrades for when it is utilised.
One possible option is to have some more metadata per couch-store file which says if the conflict-res-mode has been fixed. When we open a couchstore file and find it has not been fixed, we need to ignore the current conflict resolution mode and ensure it gets correctly initialised before writing an Item back.