Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
53a54d61
Commit
53a54d61
authored
4 years ago
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go/zodb/*: Cosmetics
parent
c20bc635
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
go/zodb/btree/btree.go
go/zodb/btree/btree.go
+3
-3
go/zodb/db.go
go/zodb/db.go
+2
-2
go/zodb/δtail.go
go/zodb/δtail.go
+2
-2
No files found.
go/zodb/btree/btree.go
View file @
53a54d61
// Copyright (C) 2018-20
19
Nexedi SA and Contributors.
// Copyright (C) 2018-20
20
Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
// Package btree provides B⁺ Trees for ZODB.
//
// It is modelled a
nd
data compatible with BTree/py package:
// It is modelled a
fter 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 pointer
s
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
...
...
This diff is collapsed.
Click to expand it.
go/zodb/db.go
View file @
53a54d61
// Copyright (C) 2018-20
19
Nexedi SA and Contributors.
// Copyright (C) 2018-20
20
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
)
{
...
...
This diff is collapsed.
Click to expand it.
go/zodb/δtail.go
View file @
53a54d61
// Copyright (C) 2018-20
19
Nexedi SA and Contributors.
// Copyright (C) 2018-20
20
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
))
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment