mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 18:17:16 +01:00
* volume: read the fields it knows from a .vif a later version wrote The .vif is parsed as strict JSON, so one field this version does not know fails the whole file. The volume server only logs that and serves the volume with an empty VolumeInfo: a read-only mark is gone, and so is the remote file of a tiered volume. Every field added to VolumeInfo makes the .vif files written from then on unreadable to the versions before it, which is what a rollback runs into. When neither the strict parse nor the old format's reads the file, it is now parsed once more with unknown fields ignored. The fields this version knows apply, and a warning names the file. The old format is still tried first, since read this way it would lose its DestroyTime, and a file that is not a VolumeInfo is still an error. * volume(rs): read an old-format .vif before the current format VifVolumeInfo ignores fields it does not know, so an old-format .vif parsed as it too: its DestroyTime and BytesOffset were dropped and the old-format fallback never ran. The Go server tries the old format before reading a file with unknown fields ignored, which keeps the destroy time. The old format is now taken only when every field in the file is one of its own, and a file that is not old-format reads as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: MapleWhiteZZZ <18653045+MapleWhiteZZZ@users.noreply.github.com> Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>