Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
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
Klaus Wölfel
wendelin.core
Commits
26d5b35e
Commit
26d5b35e
authored
Aug 17, 2015
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bigfile/zodb: Fix typos
parent
059c71e1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
bigfile/file_zodb.py
bigfile/file_zodb.py
+6
-6
No files found.
bigfile/file_zodb.py
View file @
26d5b35e
...
@@ -86,15 +86,15 @@ class ZBlk(Persistent):
...
@@ -86,15 +86,15 @@ class ZBlk(Persistent):
# storeblk), and only once.
# storeblk), and only once.
assert
self
.
_v_blkdata
is
not
None
assert
self
.
_v_blkdata
is
not
None
# NOTE self._p_changed is not necessarily true here - e.g. it is not
# NOTE self._p_changed is not necessarily true here - e.g. it is not
# for newly created objects irregardles of initial ._p_changed=True
# for newly created objects irregardles
s
of initial ._p_changed=True
blkdata
=
self
.
_v_blkdata
blkdata
=
self
.
_v_blkdata
# do not waste memory for duplicated data - as soon as blkdata lands
# do not waste memory for duplicated data - as soon as blkdata lands
# into DB we can drop it here becase ._v_blkdata was only an
# into DB we can drop it here beca
u
se ._v_blkdata was only an
# intermediate copy from fileh memory to database.
# intermediate copy from fileh memory to database.
#
#
# FIXME this works, but transaction first prepares all objects for
# FIXME this works, but transaction first prepares all objects for
# commit and on
y the saves thems
. For use it means __getstate__
# commit and on
ly then saves them
. For use it means __getstate__
# gets called very late and for all objects and thus we'll be
# gets called very late and for all objects and thus we'll be
# keeping ._v_blkdata for all of them before final phase =
# keeping ._v_blkdata for all of them before final phase =
# 2·NDirty peak memory consumption.
# 2·NDirty peak memory consumption.
...
@@ -258,7 +258,7 @@ class ZBigFile(LivePersistent):
...
@@ -258,7 +258,7 @@ class ZBigFile(LivePersistent):
Connection
.
_onOpenCallbacks
=
None
Connection
.
_onOpenCallbacks
=
None
def
Connection_onOpenCallback
(
self
,
f
):
def
Connection_onOpenCallback
(
self
,
f
):
if
self
.
_onOpenCallbacks
is
None
:
if
self
.
_onOpenCallbacks
is
None
:
# NOTE WeakSet does not work for bound methods - the
are always create
# NOTE WeakSet does not work for bound methods - the
y are always created
# anew for each obj.method access, and thus will go away almost immediately
# anew for each obj.method access, and thus will go away almost immediately
self
.
_onOpenCallbacks
=
WeakSet
()
self
.
_onOpenCallbacks
=
WeakSet
()
self
.
_onOpenCallbacks
.
add
(
f
)
self
.
_onOpenCallbacks
.
add
(
f
)
...
@@ -397,7 +397,7 @@ class _ZBigFileH(object):
...
@@ -397,7 +397,7 @@ class _ZBigFileH(object):
# currently forbidden.
# currently forbidden.
#
#
# More cleaner fix would be to teach transaction to allow joining
# More cleaner fix would be to teach transaction to allow joining
# DataManagers while commit is running, but that comes with dificulties
# DataManagers while commit is running, but that comes with dif
f
iculties
# if wanting to support whole transaction semantics (i.e. whether to
# if wanting to support whole transaction semantics (i.e. whether to
# call joined tpc_begin(), if we are already at commit()? And also what
# call joined tpc_begin(), if we are already at commit()? And also what
# to do about order - newly joined sortKey() could be lesser than
# to do about order - newly joined sortKey() could be lesser than
...
@@ -422,7 +422,7 @@ class _ZBigFileH(object):
...
@@ -422,7 +422,7 @@ class _ZBigFileH(object):
# key ordering us wrt other DataManager in tpc_*() sequence calling
# key ordering us wrt other DataManager in tpc_*() sequence calling
# NOTE for our propagated-to-objects changes to propagate to ZODB, we need
# NOTE for our propagated-to-objects changes to propagate to ZODB, we need
# to act earlier than ZODB DataManager managin zfile.blktab - hence the trick.
# to act earlier than ZODB DataManager managin
g
zfile.blktab - hence the trick.
def
sortKey
(
self
):
def
sortKey
(
self
):
# XXX _p_jar can be None - if that object is new?
# XXX _p_jar can be None - if that object is new?
zkey
=
self
.
zfile
.
_p_jar
.
sortKey
()
zkey
=
self
.
zfile
.
_p_jar
.
sortKey
()
...
...
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