Issue 11: Failed to write to replicas for volumen 3

Avoid unnecessary master lookup
This commit is contained in:
Chris Lu committed 2012-11-12 01:26:18 -08:00
1 parent ccab4217e4
commit ecd0399f8d
2 files changed
+20 -9

No files matched your search

+3
View File
@@ -73,6 +73,9 @@ func (v *Volume) readSuperBlock() {
v.replicaType, _ = NewReplicationTypeFromByte(header[1])
}
}
func (v *Volume) NeedToReplicate() bool{
return v.replicaType.GetCopyCount()>1
}
func (v *Volume) write(n *Needle) uint32 {
v.accessLock.Lock()