Commit 53a54d61 authored by Kirill Smelkov's avatar Kirill Smelkov

go/zodb/*: Cosmetics

parent c20bc635
// Copyright (C) 2018-2019 Nexedi SA and Contributors.
// Copyright (C) 2018-2020 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
// Package btree provides B⁺ Trees for ZODB.
//
// It is modelled and data compatible with BTree/py package:
// It is modelled after and is data compatible with BTree/py package:
//
// http://btrees.readthedocs.io
// https://github.com/zopefoundation/BTrees
//
// A B⁺ tree consists of nodes. Only leaf tree nodes point to data.
// Intermediate tree nodes contains keys and pointer to next-level tree nodes.
// Intermediate tree nodes contains keys and pointers to next-level tree nodes.
//
// A well-balanced B⁺ tree always have uniform depth - that is the path to any
// leaf node from the tree root is the same. However historically ZODB/py does
......
// Copyright (C) 2018-2019 Nexedi SA and Contributors.
// Copyright (C) 2018-2020 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
......@@ -310,7 +310,7 @@ type hwaiter struct {
//
// Must be called db.mu released.
func (db *DB) headWait(ctx context.Context, at Tid) (err error) {
defer xerr.Contextf(&err, "wait head ≥ %s", at)
defer xerr.Contextf(&err, "wait head ≥ @%s", at)
// precheck if db is already down -> error even if at is under coverage
if ready(db.down) {
......
// Copyright (C) 2018-2019 Nexedi SA and Contributors.
// Copyright (C) 2018-2020 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
......@@ -118,7 +118,7 @@ func (δtail *ΔTail) Tail() Tid {
//
// Note: contrary to regular go slicing, low is exclusive while high is inclusive.
func (δtail *ΔTail) SliceByRev(low, high Tid) /*readonly*/ []ΔRevEntry {
tail := δtail.Tail()
tail := δtail.tail
head := δtail.head
if !(tail <= low && low <= high && high <= head) {
panic(fmt.Sprintf("δtail.Slice: invalid query: (%s, %s]; (tail, head] = (%s, %s]", low, high, tail, head))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment