- 17 Apr, 2020 1 commit
-
-
Kirill Smelkov authored
-
- 16 Apr, 2020 1 commit
-
-
Kirill Smelkov authored
-
- 15 Apr, 2020 24 commits
-
-
Kirill Smelkov authored
-
Kirill Smelkov authored
* master: (27 commits) setup: Fix hooking of git_lsfiles in PEP517 mode lib/zodb: Add zstor_2zurl - way to convert a ZODB storage into URL to access it lib/zodb: Add patch to ZODB.Connection to support callback on connection DB view change lib/zodb: Add zconn_at draft (ZODB5 only) lib/zodb: Add zmajor - way to know under which ZODB 3, 4 or 5 we are running bigfile/zodb: Cosmetics bigfile/file.h: Cosmetics bigfile/virtmem: vma_page_addr: Kill wrong XXX bigfile/virtmem: Factor-out checking whether `page->fpgoffset` is in file-range covered by `vma` bigfile/virtmem: fileh_mmap: Refactor a bit bigfile/virtmem: vma_mmap_page: Don't skip mmap_page error silently bigfile/virtmem: Factor-out mmaping Page into VMA into vma_mmap_page bigfile/virtmem: page_del: Assert that Page is not on fileh->dirty list bigfile/virtmem: Factor-out Page struct freeing into page_del bigfile/zodb: Factor-out patch for ZODB.Connection.onOpenCallback into -> lib/zodb *: Kill unused imports bigfile/py: Move data structures to public .h file bigfile/py: Provide package-level documentation bigfile/py: Stop using Plan9 C extensions bigfile/zodb: Factor-out LivePersistent into -> lib/zodb ...
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
In PEP517 mode setup.py is sourced - not executed - and the build fails with ImportError like this: Preparing wheel metadata ... error ERROR: Command errored out with exit status 1: command: /home/kirr/src/wendelin/venv/z-dev/bin/python2 /home/kirr/src/wendelin/venv/z-dev/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp2F3aEs cwd: /home/kirr/src/wendelin/wendelin.core Complete output (53 lines): running dist_info creating /tmp/pip-modern-metadata-sPiqUt/wendelin.core.egg-info writing requirements to /tmp/pip-modern-metadata-sPiqUt/wendelin.core.egg-info/requires.txt writing /tmp/pip-modern-metadata-sPiqUt/wendelin.core.egg-info/PKG-INFO writing top-level names to /tmp/pip-modern-metadata-sPiqUt/wendelin.core.egg-info/top_level.txt writing dependency_links to /tmp/pip-modern-metadata-sPiqUt/wendelin.core.egg-info/dependency_links.txt writing entry points to /tmp/pip-modern-metadata-sPiqUt/wendelin.core.egg-info/entry_points.txt writing manifest file '/tmp/pip-modern-metadata-sPiqUt/wendelin.core.egg-info/SOURCES.txt' package init file '__init__.py' not found (or not a regular file) Traceback (most recent call last): File "/home/kirr/src/wendelin/venv/z-dev/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module> main() File "/home/kirr/src/wendelin/venv/z-dev/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/home/kirr/src/wendelin/venv/z-dev/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 110, in prepare_metadata_for_build_wheel return hook(metadata_directory, config_settings) File "/home/kirr/src/wendelin/venv/z-dev/local/lib/python2.7/site-packages/setuptools/build_meta.py", line 155, in prepare_metadata_for_build_wheel self.run_setup() File "/home/kirr/src/wendelin/venv/z-dev/local/lib/python2.7/site-packages/setuptools/build_meta.py", line 234, in run_setup self).run_setup(setup_script=setup_script) File "/home/kirr/src/wendelin/venv/z-dev/local/lib/python2.7/site-packages/setuptools/build_meta.py", line 141, in run_setup exec(compile(code, __file__, 'exec'), locals()) File "setup.py", line 374, in <module> """.splitlines()] File "/home/kirr/src/tools/go/pygolang/golang/pyx/build.py", line 118, in setup setuptools_dso.setup(**kw) File "/home/kirr/src/tools/py/pypa/setuptools_dso/src/setuptools_dso/__init__.py", line 37, in setup _setup(**kws) File "/home/kirr/src/wendelin/venv/z-dev/local/lib/python2.7/site-packages/setuptools/__init__.py", line 145, in setup return distutils.core.setup(**attrs) File "/usr/lib/python2.7/distutils/core.py", line 151, in setup dist.run_commands() File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/home/kirr/src/wendelin/venv/z-dev/local/lib/python2.7/site-packages/setuptools/command/dist_info.py", line 31, in run egg_info.run() File "/home/kirr/src/wendelin/venv/z-dev/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 296, in run self.find_sources() File "/home/kirr/src/wendelin/venv/z-dev/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 303, in find_sources mm.run() File "/home/kirr/src/wendelin/venv/z-dev/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 534, in run self.add_defaults() File "/home/kirr/src/wendelin/venv/z-dev/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 574, in add_defaults rcfiles = list(walk_revctrl()) File "/home/kirr/src/wendelin/venv/z-dev/local/lib/python2.7/site-packages/setuptools/command/sdist.py", line 20, in walk_revctrl for item in ep.load()(dirname): File "/home/kirr/src/wendelin/venv/z-dev/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2434, in load return self.resolve() File "/home/kirr/src/wendelin/venv/z-dev/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2444, in resolve raise ImportError(str(exc)) ImportError: 'module' object has no attribute 'git_lsfiles' See comments added to register_as_entrypoint for explanation of what happens. Wendelin.core will soon switch to PEP517 mode (by adding pyproject.toml) to build-require Cython, Pygolang and friends.
-
Kirill Smelkov authored
Wendelin.core 2 will need to spawn WCFS filesystem server that accesses the same ZODB database as the program that spawns it. The database argument passed to WCFS is passed in the form of URL[1,2]. Even though zodburi provides way to convert an URL into ZODB storage instance, there is currently no way for reverse operation - to convert ZODB storage instance into URL to access it(*). So we have to build it by our own. Provide zstor_2zurl stub that currently works for FileStorage only. ZEO and NEO support is TODO. In the future we might want to move this functionality into zodbtools/py. [1] https://lab.nexedi.com/nexedi/zodbtools/blob/a2e4dd23/zodbtools/help.py#L27-53 [2] https://lab.nexedi.com/kirr/neo/blob/3d909114/go/zodb/zodbtools/help.go#L25-51 (*) contrary to ZODB/go where this functionality is provided out of the box: https://godoc.org/lab.nexedi.com/kirr/neo/go/zodb#IStorage
-
Kirill Smelkov authored
Wendelin.core 2 will need to hook into when client ZODB.Connection changes its database view and readjust WCFS-level client connection accordingly. ZODB.Connection can change its view on either connection reopen, or even without reopen on start of new transaction. This patch implements ZODB.Connection.onResyncCallback for ZODB5 only. ZODB4 and ZODB3 support is TODO.
-
Kirill Smelkov authored
-
Kirill Smelkov authored
For wendelin.core v2 we need a way to know at which particular database state application-level ZODB connection is viewing the database. Knowing that state, WCFS client library will interact with WCFS filesystem server and, in simple terms, request the server to provide data as of that particular database state. Contrary to ZODB/go[1] ZODB/py does not provide the functionality to obtain DB state of connection view, so we have to build it ourselves. Let us call the function that for a client ZODB connection returns database state corresponding to its database view as zconn_at. It is relatively easy to implement zconn_at for ZODB5, since ZODB5 adopted MVCC uniformly and this patch does just that. However even with ZODB5 currently all released ZODB5 versions have race in Connection.open() vs invalidations[2], and so the first ZODB5 release with which zconn_at implemented here will work reliable should be upcoming ZODB 5.5.2 It is TODO to implement zconn_at for ZODB4 and ZODB3, which organize things differently. Please note what would happen if zconn_at gives, even a bit, incorrect answer: wcfs client will ask wcfs server to provide array data as of different database state compared to current on-client ZODB connection. This will result in that data accessed via ZBigArray will _not_ correspond to all other data accessed via regular ZODB mechanism. It is, in other words, would be a data corruptions. [1] https://godoc.org/lab.nexedi.com/kirr/neo/go/zodb#Connection [2] https://github.com/zopefoundation/ZODB/issues/290
-
Kirill Smelkov authored
This will be needed in the following patches to know how to inject zconn_at or zconn resync functionality into particular ZODB version.
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
- mention in comments that _ZBigFileH not only proxies changes from virtmem -> ZODB, but also the other way: virtmem <- ZODB. - refresh comments, fix typo.
-
Kirill Smelkov authored
-
Kirill Smelkov authored
- Provide brief top-level overview + refresh loadblk/storeblk/release comments. - Add `typedef struct bigfile_ops bigfile_ops` that we usually add for all structs.
-
Kirill Smelkov authored
-
Kirill Smelkov authored
It is valid to compare a Page and a VMA only if they belong to the same fileh.
-
Kirill Smelkov authored
-> into vma_page_infilerange(). We will soon need to use this functionality from several places.
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
Start preparing vma early, not after the call to mem_valloc. This codeflow will be more convenient when we add mmap-through-wcfs codepath.
-
- 14 Apr, 2020 14 commits
-
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
We are soon going to use this functionality from several places. The place to perform the mmap is changed slightly because vma_mmap_page deduces prot from page->state and for that we have to finish preparing page->state first.
-
Kirill Smelkov authored
-
Kirill Smelkov authored
Freed Page structs must be in PAGE_EMPTY state.
-
Kirill Smelkov authored
-
Kirill Smelkov authored
The code sequence of list_del(&page->lru); bzero(page, sizeof(*page)); /* just in case */ free(page); was open-coded several times.
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-