Commit 86237665 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 8c20a48a
...@@ -58,7 +58,7 @@ func N(short, medium, long int) int { ...@@ -58,7 +58,7 @@ func N(short, medium, long int) int {
// NewRand returns new random-number generator and seed that was used to initialize it. // NewRand returns new random-number generator and seed that was used to initialize it.
// //
// The seed can be controlled via -randseed optiong. // The seed can be controlled via -randseed option.
func NewRand() (rng *rand.Rand, seed int64) { func NewRand() (rng *rand.Rand, seed int64) {
seed = *randseedFlag seed = *randseedFlag
if seed == -1 { if seed == -1 {
......
...@@ -182,6 +182,14 @@ func StartAllStructsSrv() (_ *AllStructsSrv, err error) { ...@@ -182,6 +182,14 @@ func StartAllStructsSrv() (_ *AllStructsSrv, err error) {
// Commit creates new commit with underlying tree changed to specified tree topology. // Commit creates new commit with underlying tree changed to specified tree topology.
//
// The following topologies are treated specially:
//
// - "ø" requests deletion of the tree, and
// - "øf" requests deletion of ZBigFile, that is referencing the tree.
// - "t<kv> D<data-kv>" changes both tree natively, and ZBlk data objects.
//
// see treegen.py for details.
func (tg *TreeSrv) Commit(tree string) (_ zodb.Tid, err error) { func (tg *TreeSrv) Commit(tree string) (_ zodb.Tid, err error) {
defer xerr.Contextf(&err, "tree.srv %s: commit %s", tg.zurl, tree) defer xerr.Contextf(&err, "tree.srv %s: commit %s", tg.zurl, tree)
......
...@@ -65,7 +65,9 @@ session example: ...@@ -65,7 +65,9 @@ session example:
S: 03d85dd871718899 S: 03d85dd871718899
... ...
XXX describe ø command The following topology is treated specially:
- "ø" requests deletion of the tree.
allstructs allstructs
...@@ -114,7 +116,12 @@ session example: ...@@ -114,7 +116,12 @@ session example:
ΔFtail support ΔFtail support
-------------- --------------
XXX describe øf and `t... D...` commands. In addition to pure-tree mode, the following topologies are treated specially
by `treegen trees`:
- "øf" requests deletion of ZBigFile, that is referencing the tree,
- "t<kv> D<data-kv>" changes both tree natively, and ZBlk data objects
referenced via root['treegen/values'].
-------- --------
...@@ -195,7 +202,7 @@ class ZCtx(object): ...@@ -195,7 +202,7 @@ class ZCtx(object):
zctx.valdict = valdict zctx.valdict = valdict
commit('treegen/values: init %r' % valv, skipIfEmpty=True) commit('treegen/values: init %r' % valv, skipIfEmpty=True)
# close release resources associated with zctx. # close releases resources associated with zctx.
def close(zctx): def close(zctx):
zctx.zconn.close() zctx.zconn.close()
zctx.db.close() zctx.db.close()
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
// See https://www.nexedi.com/licensing for rationale and options. // See https://www.nexedi.com/licensing for rationale and options.
// Package xbtreetest provides infrastructure for testing LOBTree with ZBlk values. // Package xbtreetest provides infrastructure for testing LOBTree with ZBlk values.
// XXX -> treetest?
package xbtreetest package xbtreetest
import ( import (
......
...@@ -126,7 +126,7 @@ func IsErrNoData(err error) bool { ...@@ -126,7 +126,7 @@ func IsErrNoData(err error) bool {
} }
} }
// XidOf return string representation of object xid. // XidOf returns string representation of object xid.
func XidOf(obj zodb.IPersistent) string { func XidOf(obj zodb.IPersistent) string {
if obj == nil || reflect.ValueOf(obj).IsNil() { if obj == nil || reflect.ValueOf(obj).IsNil() {
return "ø" return "ø"
......
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