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
Skip volume data integrity check for volume which has remote file (#5976)
Bruce310d41998d02
diff --git a/weed/storage/volume_loading.go b/weed/storage/volume_loading.goindex 6e9b2f6234..077ce43c66 100644--- a/weed/storage/volume_loading.go+++ b/weed/storage/volume_loading.go@@ -123,9 +123,17 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKindreturn fmt.Errorf("cannot write Volume Index %s: %v", v.FileName(".idx"), err)}}- if v.lastAppendAtNs, err = CheckAndFixVolumeDataIntegrity(v, indexFile); err != nil {- v.noWriteOrDelete = true- glog.V(0).Infof("volumeDataIntegrityChecking failed %v", err)+ // Do not need to check the data integrity for remote volumes,+ // since the remote storage tier may have larger capacity, the volume+ // data read will trigger the ReadAt() function to read from the remote+ // storage tier, and download to local storage, which may cause the+ // capactiy overloading.+ if !v.HasRemoteFile() {+ glog.V(0).Infof("checking volume data integrity for volume %d", v.Id)+ if v.lastAppendAtNs, err = CheckAndFixVolumeDataIntegrity(v, indexFile); err != nil {+ v.noWriteOrDelete = true+ glog.V(0).Infof("volumeDataIntegrityChecking failed %v", err)+ }}if v.noWriteOrDelete || v.noWriteCanDelete {