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.

add a template for makeupDiff

Chris Lu7e2921832752
diff --git a/weed/storage/volume_vacuum.go b/weed/storage/volume_vacuum.go
index 785e2ff884..81db684922 100644
--- a/weed/storage/volume_vacuum.go
+++ b/weed/storage/volume_vacuum.go
@@ -38,6 +38,7 @@ func (v *Volume) commitCompact() error {
glog.V(3).Infof("Got Committing lock...")
v.nm.Close()
_ = v.dataFile.Close()
+ makeupDiff(v.FileName()+".cpd", v.FileName()+".cpx", v.FileName()+".dat", v.FileName()+".idx")
var e error
if e = os.Rename(v.FileName()+".cpd", v.FileName()+".dat"); e != nil {
return e
@@ -54,6 +55,9 @@ func (v *Volume) commitCompact() error {
return nil
}
+func makeupDiff(newDatFile, newIdxFile, oldDatFile, oldIdxFile string) (err error) {
+}
+
func (v *Volume) copyDataAndGenerateIndexFile(dstName, idxName string) (err error) {
var (
dst, idx *os.File