From f91f0dd2b617cc12b222149051a5f876d3e5cfb4 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Thu, 21 Oct 2021 13:51:55 -0500 Subject: [PATCH] hark-store: wipe archive to remove dupes --- pkg/garden/app/hark-store.hoon | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pkg/garden/app/hark-store.hoon b/pkg/garden/app/hark-store.hoon index efb865b9a..572f91e0e 100644 --- a/pkg/garden/app/hark-store.hoon +++ b/pkg/garden/app/hark-store.hoon @@ -25,6 +25,7 @@ state-6 state-7 state-8 + state-9 == :: +$ base-state @@ -56,13 +57,16 @@ +$ state-8 [%8 base-state] :: ++$ state-9 + [%9 base-state] +:: :: +$ cached-state $: by-place=(jug place:store [=lid:store =path]) ~ == +$ inflated-state - [state-8 cached-state] + [state-9 cached-state] :: ++ orm ((ordered-map @da timebox:store) gth) -- @@ -91,14 +95,20 @@ =/ old !<(versioned-state old-vase) =| cards=(list card) - ^- (quip card _this) - ?: ?=(%8 -.old) + |- ^- (quip card _this) + ?+ -.old + :: pre-dist migration + :_ this + (poke-our:pass %hark-graph-hook hark-graph-migrate+old-vase)^~ + :: + %9 =. -.state old =. +.state inflate:ha :_(this (flop cards)) :: - :_ this - (poke-our:pass %hark-graph-hook hark-graph-migrate+old-vase)^~ + %8 + $(-.old %9, archive.old *archive:store) + == :: ++ on-watch |= =path