Skip to content

Fix 'failed to unmarshal chunk' critical

Christopher Schinnerl requested to merge update-siamux into master

MERGE REQUEST

MR Guidelines

Overview

It looks like a build.Critical sometimes gets triggered when looping over the chunks of a SiaFile in sf.Health. Since it's always the first chunk it looks like we somehow end up with a SiaFile that grew its metadata but doesn't have an updated chunkOffset which points to the new beginning of the chunks. Instead it still points to the old one which causes parts of the metadata to be interpreted as a chunk.

This MR attempts to add hardening to fix this and also adds logging to identify the corrupted file.

Checklist

Review and complete the checklist to ensure that the MR is complete before assigned to an approver.

  • All new methods or updated methods have clear docstrings
  • Testing added or updated for new methods
  • Any new packages are added to Makefile and .gitlab-ci.yml
  • API documentation updated for API updates
  • Module README.md updated for changes to workflow
  • Issue added to Sia-UI repo for new supporting features
  • Changelog File Created
Edited by Christopher Schinnerl

Merge request reports

Loading