diff options
| author | Chris Lu <chris.lu@gmail.com> | 2014-02-05 10:36:37 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2014-02-05 10:36:37 -0800 |
| commit | 0e5c4e432db14a6c4582a2fd154070675a4384eb (patch) | |
| tree | e561b8c33098278271d491d775a68d492cb08c2a /go | |
| parent | 2a8c60f71bf3fee07187bea8e98632133b6e2203 (diff) | |
| download | seaweedfs-0e5c4e432db14a6c4582a2fd154070675a4384eb.tar.xz seaweedfs-0e5c4e432db14a6c4582a2fd154070675a4384eb.zip | |
report when size is closing to the volume limit
fix error
Diffstat (limited to 'go')
| -rw-r--r-- | go/storage/store.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/go/storage/store.go b/go/storage/store.go index 0f10331ca..84386cd86 100644 --- a/go/storage/store.go +++ b/go/storage/store.go @@ -267,9 +267,9 @@ func (s *Store) Write(i VolumeId, n *Needle) (size uint32, err error) { } else { err = fmt.Errorf("Volume Size Limit %d Exceeded! Current size is %d", s.volumeSizeLimit, v.ContentSize()) } - if s.volumeSizeLimit < v.ContentSize()+uint64(size) { + if s.volumeSizeLimit < v.ContentSize()+3*uint64(size) { glog.V(0).Infoln("volume", i, "size", v.ContentSize(), "will exceed limit", s.volumeSizeLimit) - if e = s.Join(); e != nil { + if e := s.Join(); e != nil { glog.V(0).Infoln("error when reporting size:", e) } } |
