aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2019-08-20 22:25:37 -0700
committerGitHub <noreply@github.com>2019-08-20 22:25:37 -0700
commitfa160e00f3ce1c0b79ecb7cbbfb72d2aa5001db4 (patch)
treed01afe7a468c7a2d92bcb0e365001a71ad98b4b8
parentb439055640e9a9d639a1745830b85b019cc92306 (diff)
parent9af9f36b8934ecb62215e24888d72902769de3fe (diff)
downloadseaweedfs-fa160e00f3ce1c0b79ecb7cbbfb72d2aa5001db4.tar.xz
seaweedfs-fa160e00f3ce1c0b79ecb7cbbfb72d2aa5001db4.zip
Merge pull request #1051 from xushuxun/master
volume: read dat files' last modified time correctly
-rw-r--r--weed/storage/volume_loading.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/storage/volume_loading.go b/weed/storage/volume_loading.go
index ed1cfe124..0b6021ca8 100644
--- a/weed/storage/volume_loading.go
+++ b/weed/storage/volume_loading.go
@@ -31,12 +31,12 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind
}
if canWrite {
v.dataFile, e = os.OpenFile(fileName+".dat", os.O_RDWR|os.O_CREATE, 0644)
- v.lastModifiedTsSeconds = uint64(modifiedTime.Unix())
} else {
glog.V(0).Infoln("opening " + fileName + ".dat in READONLY mode")
v.dataFile, e = os.Open(fileName + ".dat")
v.readOnly = true
}
+ v.lastModifiedTsSeconds = uint64(modifiedTime.Unix())
if fileSize >= _SuperBlockSize {
alreadyHasSuperBlock = true
}