Make a seat pass no repair, read every machine before passing, keep the gate's pass in memory (issue 1317, review round 1)
This commit is contained in:
@@ -85,6 +85,7 @@ func (i *Inventory) UseChain(c *chain.Chain) {
|
||||
// beside the real one, as the merge gate raises the facts snapshot's mesh in a throwaway store (issue 1121). Nothing of it
|
||||
// reaches the bus.
|
||||
func (i *Inventory) UseThrowawayChain() {
|
||||
i.MarkThrowaway()
|
||||
i.UseChain(chain.InMemory(nil))
|
||||
i.markLaidOut()
|
||||
}
|
||||
@@ -129,3 +130,9 @@ func (i *Inventory) theChain(ctx context.Context) (*chain.Chain, error) {
|
||||
}
|
||||
return c, nil
|
||||
}
|
||||
|
||||
// MarkThrowaway says this inventory is a mesh raised for a moment: a composition on it writes nothing outside it.
|
||||
func (i *Inventory) MarkThrowaway() { i.throwaway = true }
|
||||
|
||||
// Throwaway says whether this inventory is a mesh raised for a moment (UseThrowawayChain).
|
||||
func (i *Inventory) Throwaway() bool { return i != nil && i.throwaway }
|
||||
|
||||
@@ -39,6 +39,9 @@ type Inventory struct {
|
||||
state *chainState
|
||||
// recorded, when set, takes the durations a save of the chain measures in place of the store: a test with no store.
|
||||
recorded func(context.Context, Duration) error
|
||||
// throwaway is set on an inventory raised for a moment beside the real mesh (the merge gate's): nothing it
|
||||
// composes is to be written to the store or the bus.
|
||||
throwaway bool
|
||||
}
|
||||
|
||||
// Open connects to the inventory store.
|
||||
|
||||
Reference in New Issue
Block a user