mirror of https://github.com/etcd-io/bbolt.git
Merge pull request #175 from benbjohnson/check-loop
Add circular dependency integrity check.pull/34/head
commit
4508a00891
1
node.go
1
node.go
|
@ -192,6 +192,7 @@ func (n *node) write(p *page) {
|
|||
elem.pos = uint32(uintptr(unsafe.Pointer(&b[0])) - uintptr(unsafe.Pointer(elem)))
|
||||
elem.ksize = uint32(len(item.key))
|
||||
elem.pgid = item.pgid
|
||||
_assert(elem.pgid != p.id, "write: circular dependency occurred")
|
||||
}
|
||||
|
||||
// Write data for the element to the end of the page.
|
||||
|
|
Loading…
Reference in New Issue