Skip to content

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.

the isFsync parameter is essentially IsAsyncWrite and it needs to be turned off if s.isStopping

chrislu35f0daa198cf
diff --git a/weed/storage/store.go b/weed/storage/store.go
index 2b244cf706..9bfcae7ba9 100644
--- a/weed/storage/store.go
+++ b/weed/storage/store.go
@@ -441,7 +441,7 @@ func (s *Store) WriteVolumeNeedle(i needle.VolumeId, n *needle.Needle, checkCook
err = fmt.Errorf("volume %d is read only", i)
return
}
- _, _, isUnchanged, err = v.writeNeedle2(n, checkCookie, fsync || s.isStopping)
+ _, _, isUnchanged, err = v.writeNeedle2(n, checkCookie, fsync && !s.isStopping)
return
}
glog.V(0).Infoln("volume", i, "not found!")