Commit 032f76d2 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 38b7a487
...@@ -36,7 +36,7 @@ package xbtree ...@@ -36,7 +36,7 @@ package xbtree
// b) transition a BTree in ZODB through random tree topologies and feed // b) transition a BTree in ZODB through random tree topologies and feed
// ΔBtail through created database transactions. // ΔBtail through created database transactions.
// //
// TestΔBTail and TestΔBTailAllStructs implement approaches "a" and "b" correspondingly. // TestΔBTail and TestΔBTailRandom implement approaches "a" and "b" correspondingly.
// //
// testprog/treegen.py is used as helper to both: XXX moved to xbtreetest // testprog/treegen.py is used as helper to both: XXX moved to xbtreetest
// //
...@@ -1353,8 +1353,8 @@ func TestΔBTail(t *testing.T) { ...@@ -1353,8 +1353,8 @@ func TestΔBTail(t *testing.T) {
} }
// TestΔBTailAllStructs verifies ΔBtail on tree topologies generated by AllStructs. // TestΔBTailRandom verifies ΔBtail on random tree topologies generated by AllStructs.
func TestΔBTailAllStructs(t *testing.T) { func TestΔBTailRandom(t *testing.T) {
X := exc.Raiseif X := exc.Raiseif
// considerations: // considerations:
......
...@@ -79,6 +79,7 @@ type ΔFtail struct { ...@@ -79,6 +79,7 @@ type ΔFtail struct {
trackSetZFile setOid // set of tracked ZBigFiles as of @head trackSetZFile setOid // set of tracked ZBigFiles as of @head
trackSetZBlk map[zodb.Oid]*zblkTrack // zblk -> {} root -> {}blk as of @head trackSetZBlk map[zodb.Oid]*zblkTrack // zblk -> {} root -> {}blk as of @head
// XXX kill // XXX kill
///* ///*
// XXX don't need vδF - everything is reconstructed at runtime from .δBtail.vδT // XXX don't need vδF - everything is reconstructed at runtime from .δBtail.vδT
...@@ -249,7 +250,6 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) { ...@@ -249,7 +250,6 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) {
δF.ByFile[file] = δfile δF.ByFile[file] = δfile
} }
for blk /*, zblk*/ := range δt { for blk /*, zblk*/ := range δt {
// FIXME stub - need to take both keys and zblk changes into account
// XXX document, and in particular how to include atTail // XXX document, and in particular how to include atTail
δfile.Blocks.Add(blk) δfile.Blocks.Add(blk)
} }
......
...@@ -20,10 +20,26 @@ ...@@ -20,10 +20,26 @@
package zdata package zdata
// tests for δftail.go // tests for δftail.go
// //
// This are the main tests for ΔFtail functionality. // This are the main tests for ΔFtail functionality. The primary testing
// XXX overview // concern is to verify how ΔFtail merges ΔBtail and ΔZtail histories on Update
// XXX we assume that ΔBtail works correctly (this is covered by ΔBtail tests) // and queries.
// XXX -> no need to exercise many different topologies and tracking sets. //
// We assume that ΔBtail works correctly (this is covered by ΔBtail tests)
// -> no need to exercise many different topologies and tracking sets.
//
// Since ΔFtail does not recompute anything by itself when tracking set
// changes, and only merges δBtail and δZtail histories on queries, there is no
// need to exercise many different tracking sets. Once again we assume that
// ΔBtail works correctly and verify δFtail only with track=[-∞,∞).
//
// There are 2 testing approaches:
//
// a) transition a ZBigFile in ZODB through particular .blktab and ZBlk
// states and feed ΔFtail through created database transactions.
// b) transition a ZBigFile in ZODB through random .blktab and ZBlk
// states and feed ΔFtail through created database transactions.
//
// TestΔFtail and TestΔFtail implement approaches "a" and "b" correspondingly.
import ( import (
"context" "context"
......
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