mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
skip isFileUnchanged checking since ttl always change
skip checking since ttl always change. Fixing https://github.com/chrislusf/seaweedfs/issues/166
This commit is contained in:
parent
a4d3f2da3d
commit
2c595d2d16
|
@ -152,6 +152,9 @@ func (v *Volume) NeedToReplicate() bool {
|
||||||
// isFileUnchanged checks whether this needle to write is same as last one.
|
// isFileUnchanged checks whether this needle to write is same as last one.
|
||||||
// It requires serialized access in the same volume.
|
// It requires serialized access in the same volume.
|
||||||
func (v *Volume) isFileUnchanged(n *Needle) bool {
|
func (v *Volume) isFileUnchanged(n *Needle) bool {
|
||||||
|
if v.Ttl == EMPTY_TTL || v.Ttl.String() == "" {
|
||||||
|
return true
|
||||||
|
}
|
||||||
nv, ok := v.nm.Get(n.Id)
|
nv, ok := v.nm.Get(n.Id)
|
||||||
if ok && nv.Offset > 0 {
|
if ok && nv.Offset > 0 {
|
||||||
oldNeedle := new(Needle)
|
oldNeedle := new(Needle)
|
||||||
|
|
Loading…
Reference in a new issue