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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
c6c69c5a
Commit
c6c69c5a
authored
Dec 18, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a6c29fd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
bigfile/_file_zodb.pyx
bigfile/_file_zodb.pyx
+5
-6
No files found.
bigfile/_file_zodb.pyx
View file @
c6c69c5a
...
@@ -54,15 +54,14 @@ from wendelin.lib.zodb import zconn_at
...
@@ -54,15 +54,14 @@ from wendelin.lib.zodb import zconn_at
# - provides blkmmapper with WCFS integration.
# - provides blkmmapper with WCFS integration.
cdef
public
class
_ZBigFile
(
BigFile
)
[
object
_ZBigFile
,
type
_ZBigFile_Type
]:
cdef
public
class
_ZBigFile
(
BigFile
)
[
object
_ZBigFile
,
type
_ZBigFile_Type
]:
cdef
object
zself
# reference to ZBigFile
cdef
object
zself
# reference to ZBigFile
# cdef wcfs.Oid foid # = .zself._p_oid
cdef
wcfs
.
FileH
wfileh
# WCFS file handle. Initially nil, opened by blkmmapper
cdef
wcfs
.
FileH
wfileh
# WCFS file handle. Initially nil, opened by blkmmapper
# _new creates new _ZBigFile associated with ZBigFile zself.
# XXX Cython does not allow __new__ nor to change arguments passed to __cinit__ / __init__
# XXX Cython does not allow __new__ nor to change arguments passed to __cinit__ / __init__
@
staticmethod
@
staticmethod
def
_new
(
zself
,
blksize
):
def
_new
(
zself
,
blksize
):
cdef
_ZBigFile
obj
=
_ZBigFile
.
__new__
(
_ZBigFile
,
blksize
)
cdef
_ZBigFile
obj
=
_ZBigFile
.
__new__
(
_ZBigFile
,
blksize
)
obj
.
zself
=
zself
obj
.
zself
=
zself
# obj.foid = -1 # Note: zself._p_oid could be yet None for newly created ZBigFile
obj
.
wfileh
=
nil
obj
.
wfileh
=
nil
return
obj
return
obj
...
@@ -70,12 +69,13 @@ cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]:
...
@@ -70,12 +69,13 @@ cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]:
zf
.
wfileh
=
nil
zf
.
wfileh
=
nil
# redirect load/store
/mapper
to main class
# redirect load/store to main class
def
loadblk
(
self
,
blk
,
buf
):
return
self
.
zself
.
loadblk
(
blk
,
buf
)
def
loadblk
(
self
,
blk
,
buf
):
return
self
.
zself
.
loadblk
(
blk
,
buf
)
def
storeblk
(
self
,
blk
,
buf
):
return
self
.
zself
.
storeblk
(
blk
,
buf
)
def
storeblk
(
self
,
blk
,
buf
):
return
self
.
zself
.
storeblk
(
blk
,
buf
)
#def blkmmapper(self): return self.zself.blkmmapper()
# blkmmapper serves PyBigFile and gives it XXX ...
# blkmmapper returns pycapsule with virtmem mmapper for the file.
#
# XXX
#
#
# it is called from PyBigFile.fileh_open(mmap_overlay=True) and .zfile
# it is called from PyBigFile.fileh_open(mmap_overlay=True) and .zfile
# should be already associated with jar and have oid.
# should be already associated with jar and have oid.
...
@@ -85,7 +85,6 @@ cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]:
...
@@ -85,7 +85,6 @@ cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]:
zconn
=
zf
.
zself
.
_p_jar
zconn
=
zf
.
zself
.
_p_jar
assert
zconn
is
not
None
assert
zconn
is
not
None
# XXX locking? or rely on that ZODB objects for must be used from under 1 thread only?
# XXX locking? or rely on that ZODB objects for must be used from under 1 thread only?
# zf.foid = u64(zf.zself._p_oid)
# join zconn to wconn; link to wconn from _ZBigFile
# join zconn to wconn; link to wconn from _ZBigFile
pywconn
=
pywconnOf
(
zconn
)
pywconn
=
pywconnOf
(
zconn
)
...
...
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