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
13ee0416
Commit
13ee0416
authored
Feb 22, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a4d63fbb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
bigfile/file_zodb.py
bigfile/file_zodb.py
+1
-1
wcfs/__init__.py
wcfs/__init__.py
+8
-6
No files found.
bigfile/file_zodb.py
View file @
13ee0416
...
...
@@ -568,7 +568,7 @@ class ZBigFile(LivePersistent):
def
_default_use_wcfs
():
virtmem
=
os
.
environ
.
get
(
"WENDELIN_CORE_VIRTMEM"
,
"rw:uvmm"
)
# unset -> !wcfs
virtmem
=
virtmem
.
lower
()
return
{
"r:wcfs+w:uvmm"
:
True
,
"rw:uvmm"
:
Tru
e
}[
virtmem
]
return
{
"r:wcfs+w:uvmm"
:
True
,
"rw:uvmm"
:
Fals
e
}[
virtmem
]
...
...
wcfs/__init__.py
View file @
13ee0416
...
...
@@ -67,11 +67,11 @@ class Conn(object):
zconn
=
zfile
.
_p_jar
# XXX ._start is probably ZODB5 only -> check ZODB4 and ZODB3
zat
=
p64
(
u64
(
zconn
.
_start
)
-
1
)
# before -> at
zat
=
p64
(
u64
(
zconn
.
_st
orage
.
_st
art
)
-
1
)
# before -> at
# XXX pinned to @revX/... for now -> TODO /head/bigfile/...
path
=
'%s/@%s/bigfile/%s'
%
(
self
.
mountpoint
,
ashex
(
zat
),
ashex
(
self
.
_p_oid
))
fd
=
os
.
open
(
path
)
path
=
'%s/@%s/bigfile/%s'
%
(
self
.
mountpoint
,
ashex
(
zat
),
ashex
(
zfile
.
_p_oid
))
fd
=
os
.
open
(
path
,
os
.
O_RDONLY
)
return
FileH
(
fd
)
...
...
@@ -82,12 +82,13 @@ class Conn(object):
# XXX it should implement wcfs invalidation protocol and remmap head/... parts
# to pinned as requested.
import
mmap
from
bigarray.array_ram
import
_VMA
,
pagesize
# XXX hack
from
bigarray
import
pagesize
# XXX hack
from
bigarray.array_ram
import
_VMA
# XXX hack
class
FileH
(
object
):
# .fd
def
__init__
(
self
,
fd
):
self
.
fd
self
.
fd
=
fd
def
__del__
(
self
):
os
.
close
(
self
.
fd
)
...
...
@@ -177,7 +178,8 @@ def join(zurl, autostart=_default_autostart(), shared=False):
# start wcfs with telling it to automatically exit when there is no client activity.
# XXX extra opts -> join args -> test + -v=1 if running py.test -v
# XXX ^^^ check log level?
return
_start
(
zurl
,
"-autoexit"
,
'-d'
,
'-alsologtostderr'
,
'-v=1'
)
#return _start(zurl, "-autoexit", '-d', '-alsologtostderr', '-v=1')
return
_start
(
zurl
,
"-autoexit"
,
'-alsologtostderr'
)
# _start starts wcfs server for ZODB @ zurl.
...
...
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