mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
report when size is closing to the volume limit
fix error
This commit is contained in:
parent
2a8c60f71b
commit
0e5c4e432d
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue