mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-24 11:09:12 +08:00
Merge pull request #1051 from xushuxun/master
volume: read dat files' last modified time correctly
This commit is contained in:
commit
fa160e00f3
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user