Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
c13c3068
Commit
c13c3068
authored
Jul 31, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
82746330
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
go/zodb/connection.go
go/zodb/connection.go
+10
-0
go/zodb/db.go
go/zodb/db.go
+1
-1
No files found.
go/zodb/connection.go
View file @
c13c3068
...
...
@@ -118,6 +118,16 @@ type LiveCacheControl interface {
// ----------------------------------------
// newConnection creates new Connection associated with db.
func
newConnection
(
db
*
DB
,
at
Tid
)
*
Connection
{
return
&
Connection
{
stor
:
db
.
stor
,
db
:
db
,
at
:
at
,
objtab
:
make
(
map
[
Oid
]
*
weak
.
Ref
),
}
}
// wrongClassError is the error cause returned when ZODB object's class is not what was expected.
type
wrongClassError
struct
{
want
,
have
string
...
...
go/zodb/db.go
View file @
c13c3068
...
...
@@ -135,7 +135,7 @@ func (db *DB) get(at Tid) *Connection {
// nothing found or too distant
const
Tnear
=
10
*
time
.
Minute
// XXX hardcoded
if
jδmin
<
0
||
tabs
(
δtid
(
at
,
db
.
connv
[
jδmin
]
.
at
))
>
Tnear
{
return
&
Connection
{
stor
:
db
.
stor
,
db
:
db
,
at
:
at
}
return
newConnection
(
db
,
at
)
}
// reuse the connection
...
...
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