Commit 8e049dd2 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 9e6a2f9a
......@@ -63,7 +63,7 @@ several client processes that use ZODB.
In shared-cache mode file's data is accessed through special filesystem for
which data cache is centrally maintained by OS kernel. This mode was added in
2020 and reduces wendelin.core RAM consumption dramatically. Note that even
2021 and reduces wendelin.core RAM consumption dramatically. Note that even
though the cache is shared, isolation property is still fully provided. Please
see wcfs/wcfs.go which describes the filesystem and shared-cache mode in detail.
......@@ -602,8 +602,9 @@ class ZBigFile(LivePersistent):
# More: the algorythm to compute δ(ZODB) -> δ(blk) is more complex
# than 1-1 ZBlk <-> blk mapping: ZBlk could stay constant, but if
# ZBigFile.blktab topology is changed, affected file blocks have to
# be invalidated. Currently both !wcfs and wcfs codepaths fail to
# handle that, but wcfs will be improved and !wcfs will be deprecated.
# be invalidated. Currently !wcfs codepath fails to handle that,
# while wcfs handles invalidations correctly. The plan is to make
# wcfs way the primary and to deprecate !wcfs.
#
# -> don't propagate ZODB -> WCFS invalidation by client to fully
# rely on and test wcfs subsystem.
......
......@@ -28,7 +28,6 @@ from BTrees.IOBTree import IOBTree
import transaction
from transaction import TransactionManager
from golang import defer, func
import weakref, gc
from pytest import raises
import pytest; xfail = pytest.mark.xfail
......
......@@ -159,8 +159,8 @@ def zconn_at(zconn): # -> tid
# We rely on our patch in 4-nxd branch that reworks ZODB.Connection to
# implement MVCC via always calling loadBefore(zconn._txn_time) to load objects.
elif zmajor == 4:
assert 'conn:MVCC-via-loadBefore-only' in ZODB.nxd_patches, \
"https://lab.nexedi.com/nexedi/ZODB/merge_requests/1"
_zassertHasNXDPatch('conn:MVCC-via-loadBefore-only',
"https://lab.nexedi.com/nexedi/ZODB/merge_requests/1")
if zconn._mvcc_storage:
raise NotImplementedError("Connection.at for IMVCCStorage is not implemented")
......@@ -180,6 +180,14 @@ def before2at(before): # -> at
return p64(u64(before) - 1)
# _zassertHasNXDPatch asserts that ZODB is patched with specified Nexedi-provided patch.
def _zassertHasNXDPatch(patch, details_link):
nxd_patches = getattr(ZODB, 'nxd_patches', set())
if patch not in nxd_patches:
raise AssertionError(
"ZODB%s is not patched with required Nexedi patch %r\n\tSee %s for details" %
(zmajor, patch, details_link))
# _zversion returns ZODB version object
def _zversion():
dzodb3 = pkg_resources.working_set.find(pkg_resources.Requirement.parse('ZODB3'))
......
......@@ -83,8 +83,7 @@ from six.moves.urllib.parse import urlsplit, urlunsplit
from .client._wcfs import \
PyWCFS as _WCFS, \
PyWatchLink as WatchLink, \
PyPinReq as PinReq \
PyWatchLink as WatchLink \
# Server represents running wcfs server.
......
......@@ -36,7 +36,6 @@ from wendelin.wcfs.internal.wcfs_test import read_mustfault
from wendelin.wcfs.internal import mm
from pytest import raises
from golang.golang_test import panics
import os, multiprocessing, gc
......
......@@ -851,11 +851,6 @@ retry:
return make_pair(nil, E(err));
}
// TODO ensure f<foid>@ wconn.at exists - else we get pins to non-existing
// state from wcfs, pinner replies nak, wcfs sends SIGBUS.
// TODO -> better teach wcfs to reject "watch <foid> @at" for @at where f did not existed.
// (see test_wcfs_watch_before_create)
FileH f; bool ok;
tie(f, ok) = wconn._filehTab.get_(foid);
if (ok) {
......
......@@ -17,8 +17,6 @@
// See COPYING file for full licensing terms.
// See https://www.nexedi.com/licensing for rationale and options.
#include "wcfs_misc.h"
#include "wcfs.h"
#include "wcfs_watchlink.h"
#include <golang/errors.h>
......
......@@ -5,10 +5,9 @@ go 1.14
require (
github.com/golang/glog v1.0.0
github.com/hanwen/go-fuse/v2 v2.1.0 // replaced to -> kirr/go-fuse@y/nodefs-cancel
github.com/johncgriffin/overflow v0.0.0-20170615021017-4d914c927216
github.com/johncgriffin/overflow v0.0.0-20211019200055-46fa312c352c
github.com/kisielk/og-rek v1.1.1-0.20210310094122-8def3d024dac
github.com/pkg/errors v0.9.1
github.com/stretchr/objx v0.3.0 // indirect
github.com/stretchr/testify v1.7.0
lab.nexedi.com/kirr/go123 v0.0.0-20210906140734-c9eb28d9e408
lab.nexedi.com/kirr/neo/go v0.0.0-20211004111643-c74a5a3cd0d0
......
This diff is collapsed.
......@@ -22,7 +22,7 @@
// xbtreetest at runtime.
package init
// ZBlk-related part of δbtail_test
// ZBlk-related part of xbtreetest
import (
"context"
......
......@@ -954,7 +954,7 @@ retry:
for sk := range gdebug.zheadSockTab {
_, err := fmt.Fprintf(xio.BindCtxW(sk, ctx), "%s\n", δZ.Tid)
if err != nil {
log.Errorf("zhead: %s: write: %s (detaching reader)", sk, err)
log.Errorf("zhead: %s: write: %s (detaching reader)", sk.file, err)
sk.Close()
delete(gdebug.zheadSockTab, sk)
}
......
......@@ -367,6 +367,8 @@ class tWCFS(_tWCFS):
go(t._abort_ontimeout, t._wcfuseabort, 10*time.second, nogilready) # NOTE must be: with_timeout << · << wcfs_pin_timeout
nogilready.recv() # wait till _abort_ontimeout enters nogil
# _abort_ontimeout is in wcfs_test.pyx
# close closes connection to wcfs, unmounts the filesystem and makes sure
# that wcfs server exits.
@func
......@@ -440,8 +442,6 @@ class tDB(tWCFS):
def head(t):
return t.dFtail[-1].rev
# _abort_ontimeout is in wcfs_test.pyx
# close closes test database as well as all tracked files, watch links and wcfs.
# it also prints change history to help developer overview current testcase.
@func
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment