Commit cb0b6897 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 6d7c2bcc
...@@ -180,6 +180,7 @@ type ΔBtail struct { ...@@ -180,6 +180,7 @@ type ΔBtail struct {
trackIdx trackIndex trackIdx trackIndex
// XXX root -> tracked holes // XXX root -> tracked holes
// XXX move -> ΔTtail ?
holeIdxByRoot map[zodb.Oid]treeSetKey holeIdxByRoot map[zodb.Oid]treeSetKey
// // tracked objects that are not yet taken into account in current δBtail // // tracked objects that are not yet taken into account in current δBtail
......
...@@ -74,6 +74,8 @@ type ΔFtail struct { ...@@ -74,6 +74,8 @@ type ΔFtail struct {
δBtail *ΔBtail δBtail *ΔBtail
fileIdx map[zodb.Oid]SetBigFile // tree-root -> {} BigFile as of @head fileIdx map[zodb.Oid]SetBigFile // tree-root -> {} BigFile as of @head
// XXX don't need vδF - everything is reconstructed at runtime from .δBtail.vδT
// this way we also don't need to keep up updating vδF from vδT on its rebuild during.
// data with δF changes. Actual for part of tracked set that was taken // data with δF changes. Actual for part of tracked set that was taken
// into account. // into account.
vδF []ΔF vδF []ΔF
...@@ -294,6 +296,7 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit, zhead *ZConn) (_ ΔF, err ...@@ -294,6 +296,7 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit, zhead *ZConn) (_ ΔF, err
return δF, nil return δF, nil
} }
// XXX kill after vδF is gone
// update processes new track requests and updates vδF. // update processes new track requests and updates vδF.
// //
// If file != nil only track requests related to file are processed. // If file != nil only track requests related to file are processed.
...@@ -341,6 +344,7 @@ func (δFtail *ΔFtail) update(file *BigFile) { ...@@ -341,6 +344,7 @@ func (δFtail *ΔFtail) update(file *BigFile) {
// ForgetPast discards all δFtail entries with rev ≤ revCut. // ForgetPast discards all δFtail entries with rev ≤ revCut.
func (δFtail *ΔFtail) ForgetPast(revCut zodb.Tid) { func (δFtail *ΔFtail) ForgetPast(revCut zodb.Tid) {
panic("TODO") panic("TODO")
// XXX -> .δBtail.ForgetPast(recCut)
} }
// XXX // XXX
...@@ -362,6 +366,9 @@ func (δFtail *ΔFtail) SliceByRev(lo, hi zodb.Tid) /*readonly*/ []ΔF { ...@@ -362,6 +366,9 @@ func (δFtail *ΔFtail) SliceByRev(lo, hi zodb.Tid) /*readonly*/ []ΔF {
func (δFtail *ΔFtail) SliceByFileRev(file *BigFile, lo, hi zodb.Tid) /*readonly*/[]*ΔFile { func (δFtail *ΔFtail) SliceByFileRev(file *BigFile, lo, hi zodb.Tid) /*readonly*/[]*ΔFile {
δassertSlice(δFtail, lo, hi) δassertSlice(δFtail, lo, hi)
// FIXME rework to just query .δBtail.SliceByRootRev(file.blktab, lo, hi) +
// merge δZBlk history iwith that.
// XXX locking? // XXX locking?
δFtail.update(file) δFtail.update(file)
......
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