mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fix mysql data store bug
This commit is contained in:
parent
c5a63f4775
commit
04c2c5e58d
|
@ -148,12 +148,16 @@ func (s *MySqlStore) Put(fullFilePath string, fid string) (err error) {
|
||||||
} else {
|
} else {
|
||||||
if len(old_fid) == 0 {
|
if len(old_fid) == 0 {
|
||||||
err = s.insert(fullFilePath, fid, s.dbs[instance_offset], tableFullName)
|
err = s.insert(fullFilePath, fid, s.dbs[instance_offset], tableFullName)
|
||||||
|
if err != nil {
|
||||||
err = fmt.Errorf("MySqlStore Put operation failed when inserting path %s with fid %s : err is %v", fullFilePath, fid, err)
|
err = fmt.Errorf("MySqlStore Put operation failed when inserting path %s with fid %s : err is %v", fullFilePath, fid, err)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
err = s.update(fullFilePath, fid, s.dbs[instance_offset], tableFullName)
|
err = s.update(fullFilePath, fid, s.dbs[instance_offset], tableFullName)
|
||||||
|
if err != nil {
|
||||||
err = fmt.Errorf("MySqlStore Put operation failed when updating path %s with fid %s : err is %v", fullFilePath, fid, err)
|
err = fmt.Errorf("MySqlStore Put operation failed when updating path %s with fid %s : err is %v", fullFilePath, fid, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue