SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
update metric for ErrorCRC if it happens during volume readNeedleDataInto (#5957)
Eugeniy E. Mikhailov220061573d3f
diff --git a/weed/storage/volume_read.go b/weed/storage/volume_read.goindex 09fbdd7012..34b75660e3 100644--- a/weed/storage/volume_read.go+++ b/weed/storage/volume_read.go@@ -7,6 +7,7 @@ import ("time""github.com/seaweedfs/seaweedfs/weed/glog"+ "github.com/seaweedfs/seaweedfs/weed/stats""github.com/seaweedfs/seaweedfs/weed/storage/backend""github.com/seaweedfs/seaweedfs/weed/storage/needle""github.com/seaweedfs/seaweedfs/weed/storage/super_block"@@ -180,6 +181,7 @@ func (v *Volume) readNeedleDataInto(n *needle.Needle, readOption *ReadOption, wr}if offset == 0 && size == int64(n.DataSize) && (n.Checksum != crc && uint32(n.Checksum) != crc.Value()) {// the crc.Value() function is to be deprecated. this double checking is for backward compatible.+ stats.VolumeServerHandlerCounter.WithLabelValues(stats.ErrorCRC).Inc()return fmt.Errorf("ReadNeedleData checksum %v expected %v", crc, n.Checksum)}return nil