- 14 Dec, 2018 2 commits
-
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
- 04 Dec, 2018 1 commit
-
-
Kirill Smelkov authored
-
- 23 Oct, 2018 1 commit
-
-
Kirill Smelkov authored
-
- 17 Oct, 2018 1 commit
-
-
Kirill Smelkov authored
-
- 15 Oct, 2018 1 commit
-
-
Kirill Smelkov authored
-
- 09 Oct, 2018 2 commits
-
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
- 08 Oct, 2018 4 commits
-
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
- 02 Oct, 2018 3 commits
-
-
Kirill Smelkov authored
* master: go/zodb: Connection += .At()
-
Kirill Smelkov authored
To know database state corresponding to the connection.
-
Kirill Smelkov authored
-
- 01 Oct, 2018 3 commits
-
-
Kirill Smelkov authored
* master: go/zodb: Don't truncate Tid time precision to 1µs
-
Kirill Smelkov authored
The format of tid assumes ~ ns precision, and it is only formatted to µs precision by default. So don't truncate TimeStamp value when computing it from Tid, and perform the µs-rounding only on formatting. The float numbers are not always exactly as in python. For example the following program tidv = [ 0x0000000000000000, 0x0285cbac258bf266, 0x0285cbad27ae14e6, 0x037969f722a53488, 0x03b84285d71c57dd, 0x03caa84275fc1166, ] for tid in tidv: t = TimeStamp.TimeStamp(p64(tid)) print '0x%016x %s %.9f\t%.9f' % (tid, t, t.timeTime(), t.second()) prints: 0x0000000000000000 1900-01-01 00:00:00.000000 -2208988800.000000000 0.000000000 0x0285cbac258bf266 1979-01-03 21:00:08.800000 284245208.800000191 8.800000185 0x0285cbad27ae14e6 1979-01-03 21:01:09.300001 284245269.300001621 9.300001496 <-- ex here 0x037969f722a53488 2008-10-24 05:11:08.120000 1224825068.119999886 8.119999878 0x03b84285d71c57dd 2016-07-01 09:41:50.416574 1467366110.416574001 50.416573989 0x03caa84275fc1166 2018-10-01 16:34:27.652650 1538411667.652649879 27.652650112 the difference is due to floating point operation ordering, because TimeStamp.timeTime() looses precision - e.g. for marked case: In [8]: '%.10f' % (281566860.000000000 + 9.300001496) Out[8]: '281566869.3000015020' We don't try to mimic float64 behaviour to Python exactly - because it is even different for PURE_PYTHON=y or C TimeStamp implementations. However we don't limit due to that our timestamp precision to only 1µs. In other words we keep on maintaining exact compatibility with Python on printing, but timestamp values itself are now ~ ns precision.
-
Kirill Smelkov authored
-
- 30 Sep, 2018 3 commits
-
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
- 28 Sep, 2018 3 commits
-
-
Kirill Smelkov authored
* master: go/zodb/fs1/index: Don't rely on []byte being pickled as string
-
Kirill Smelkov authored
As https://github.com/kisielk/og-rek/pull/57 maybe shows []byte was pickling as string only unintentionally and that might change. We are already explicitly checking for string in corresponding index load place: https://lab.nexedi.com/kirr/neo/blob/2dba8607/go/zodb/storage/fs1/index.go#L282 so it is better we also explicitly save the bits as string. If we don't and https://github.com/kisielk/og-rek/pull/57 gets accepted, tests will fail: --- FAIL: TestIndexSaveLoad (0.00s) index_test.go:176: index load: /tmp/t-index893650059/458967662/1.fs.index: pickle @6: invalid oidPrefix: type []uint8 Traceback (most recent call last): File "./py/indexcmp", line 41, in <module> main() File "./py/indexcmp", line 29, in main d2 = fsIndex.load(path2) File "/home/kirr/src/wendelin/z/ZODB/src/ZODB/fsIndex.py", line 138, in load data[ensure_bytes(k)] = fsBucket().fromString(ensure_bytes(v)) File "/home/kirr/src/wendelin/z/ZODB/src/ZODB/fsIndex.py", line 71, in ensure_bytes return s.encode('ascii') if not isinstance(s, bytes) else s AttributeError: 'bytearray' object has no attribute 'encode' --- FAIL: TestIndexSaveToPy (0.04s) index_test.go:218: zodb/py read/compare index: exit status 1
-
Kirill Smelkov authored
-
- 04 Sep, 2018 2 commits
-
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
- 03 Sep, 2018 3 commits
-
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
- 31 Aug, 2018 1 commit
-
-
Kirill Smelkov authored
-
- 10 Aug, 2018 5 commits
-
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
- 09 Aug, 2018 5 commits
-
-
Kirill Smelkov authored
* master: go/zodb/btree: New package to work with ZODB BTrees (draft) go/zodb: DB - application-level handle to database (very draft) go/zodb: Connection: Allow applications to tune live-cache eviction policy go/zodb: Implement Connection go/zodb/internal/weak: New package to handle weak references go/zodb: PyStateful persistency support go/zodb: pydata: Factor out class extraction logic into xpyclass go/zodb: Persistent - the base type to implement IPersistent objects go/zodb: IPersistent + Connection stub go/zodb: pkgdoc: Add section overviewing storage drivers go/zodb: pkgdoc: Put zodbtools reference into "Miscellaneous" section go/zodb: pkgdoc: "Operations" -> "Storage layer" go/zodb: pkgdoc: Stress that objects can reference each other in the database go/zodb: Pkgdoc cosmetics go/zodb: Provide invalid Oid value go/zodb: OpenOptions: Document that NoCache disables prefetch go/transaction: New package to deal with transactions (very draft)
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
Provide minimal support for BTrees.LOBTree Get for now.
-
Kirill Smelkov authored
DB represents a handle to database at application level and contains pool of connections. DB.Open opens database connection. The connection will be automatically put back into DB pool for future reuse after corresponding transaction is complete. DB thus provides service to maintain live objects cache and reuse live objects from transaction to transaction. Note that it is possible to have several DB handles to the same database. This might be useful if application accesses distinctly different sets of objects in different transactions and knows beforehand which set it will be next time. Then, to avoid huge cache misses, it makes sense to keep DB handles opened for every possible case of application access. TODO handle invalidations.
-