Update server dependencies
This commit is contained in:
parent
6865bf2832
commit
f1c3326af1
152 changed files with 16097 additions and 4318 deletions
13
Godeps/_workspace/src/github.com/boltdb/bolt/node.go
generated
vendored
13
Godeps/_workspace/src/github.com/boltdb/bolt/node.go
generated
vendored
|
@ -221,11 +221,20 @@ func (n *node) write(p *page) {
|
|||
_assert(elem.pgid != p.id, "write: circular dependency occurred")
|
||||
}
|
||||
|
||||
// If the length of key+value is larger than the max allocation size
|
||||
// then we need to reallocate the byte array pointer.
|
||||
//
|
||||
// See: https://github.com/boltdb/bolt/pull/335
|
||||
klen, vlen := len(item.key), len(item.value)
|
||||
if len(b) < klen+vlen {
|
||||
b = (*[maxAllocSize]byte)(unsafe.Pointer(&b[0]))[:]
|
||||
}
|
||||
|
||||
// Write data for the element to the end of the page.
|
||||
copy(b[0:], item.key)
|
||||
b = b[len(item.key):]
|
||||
b = b[klen:]
|
||||
copy(b[0:], item.value)
|
||||
b = b[len(item.value):]
|
||||
b = b[vlen:]
|
||||
}
|
||||
|
||||
// DEBUG ONLY: n.dump()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue