From 2c595d2d16629f7163587e1a08f2419c3df78ecc Mon Sep 17 00:00:00 2001 From: chrislusf Date: Fri, 10 Jul 2015 09:43:49 -0700 Subject: [PATCH] skip isFileUnchanged checking since ttl always change skip checking since ttl always change. Fixing https://github.com/chrislusf/seaweedfs/issues/166 --- go/storage/volume.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/go/storage/volume.go b/go/storage/volume.go index 0e6cadecc..998b0dd64 100644 --- a/go/storage/volume.go +++ b/go/storage/volume.go @@ -152,6 +152,9 @@ func (v *Volume) NeedToReplicate() bool { // isFileUnchanged checks whether this needle to write is same as last one. // It requires serialized access in the same volume. func (v *Volume) isFileUnchanged(n *Needle) bool { + if v.Ttl == EMPTY_TTL || v.Ttl.String() == "" { + return true + } nv, ok := v.nm.Get(n.Id) if ok && nv.Offset > 0 { oldNeedle := new(Needle)