diff options
| author | xushuxun <xushuxun@outlook.com> | 2019-08-21 11:26:01 +0800 |
|---|---|---|
| committer | xushuxun <xushuxun@outlook.com> | 2019-08-21 11:26:01 +0800 |
| commit | 9af9f36b8934ecb62215e24888d72902769de3fe (patch) | |
| tree | 3907eadcf1b9fd20236d248eb945b2ad9eec739c | |
| parent | 5904d78bd4d00c42ae163713b44dbdffd432ff9a (diff) | |
| download | seaweedfs-9af9f36b8934ecb62215e24888d72902769de3fe.tar.xz seaweedfs-9af9f36b8934ecb62215e24888d72902769de3fe.zip | |
volume: read dat files' last modified time no matter dat files are catWrite or readonly
| -rw-r--r-- | weed/storage/volume_loading.go | 2 |
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 } |
