mirror of
https://github.com/etcd-io/bbolt.git
synced 2025-05-31 11:42:30 +00:00
Merge pull request #175 from benbjohnson/check-loop
Add circular dependency integrity check.
This commit is contained in:
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…
x
Reference in New Issue
Block a user