VOL-1497 : Add more control to kv/memory access
- Added kv locking mechanism (etcd only)
- (watch) control path access whenever possible
- (watch) use a transaction for updates and merge with memory
- cleaned up vendoring
- misc changes to fix exceptions found along the way
Amendments:
- Copyright header got removed in auto-generated file
- Changed default locking to false for KV list operation
- Updated backend api to allow the passing of locking parameter
Change-Id: Ie1a55d3ca8b9d92ae71a85ce42bb22fcf1419e2c
diff --git a/vendor/github.com/pierrec/lz4/block.go b/vendor/github.com/pierrec/lz4/block.go
index 00b1111..07863ce 100644
--- a/vendor/github.com/pierrec/lz4/block.go
+++ b/vendor/github.com/pierrec/lz4/block.go
@@ -61,7 +61,7 @@
}
i := si
si += lLen
- di += copy(dst[di:], src[i:si])
+ di += copy(dst[di:di+si-i], src[i:si])
if si >= sn {
return di, nil
@@ -97,7 +97,7 @@
di += bytesToCopy
mLen -= bytesToCopy
}
- di += copy(dst[di:], dst[i:i+mLen])
+ di += copy(dst[di:di+mLen], dst[i:i+mLen])
}
}
@@ -186,7 +186,7 @@
di++
// Literals.
- copy(dst[di:], src[anchor:anchor+lLen])
+ copy(dst[di:di+lLen], src[anchor:anchor+lLen])
di += lLen + 2
anchor = si
@@ -230,7 +230,7 @@
// Incompressible.
return 0, nil
}
- di += copy(dst[di:], src[anchor:])
+ di += copy(dst[di:di+len(src)-anchor], src[anchor:])
return di, nil
}
@@ -347,7 +347,7 @@
di++
// Literals.
- copy(dst[di:], src[anchor:anchor+lLen])
+ copy(dst[di:di+lLen], src[anchor:anchor+lLen])
di += lLen
anchor = si
@@ -392,6 +392,6 @@
// Incompressible.
return 0, nil
}
- di += copy(dst[di:], src[anchor:])
+ di += copy(dst[di:di+len(src)-anchor], src[anchor:])
return di, nil
}