aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2016-09-26 22:26:39 -0700
committerChris Lu <chris.lu@gmail.com>2016-09-26 22:26:41 -0700
commit7e2921832752b2787a4392b9000d13ac00a4fdfe (patch)
treee1e49d59403c04135e8c655b0657d13332108d5c
parent8fa61c28e4745d5ec7e89508740ce9cb2900fffb (diff)
downloadseaweedfs-7e2921832752b2787a4392b9000d13ac00a4fdfe.tar.xz
seaweedfs-7e2921832752b2787a4392b9000d13ac00a4fdfe.zip
add a template for makeupDiff
-rw-r--r--weed/storage/volume_vacuum.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/storage/volume_vacuum.go b/weed/storage/volume_vacuum.go
index 785e2ff88..81db68492 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