Merge pull request #4135 from urbit/la/remove-clay-write

graph-store: remove unnecessary clay write upon clobber
This commit is contained in:
matildepark 2020-12-11 16:09:33 -05:00 committed by GitHub
commit 3a8264f96b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -257,20 +257,7 @@
?& !(~(has by archive) resource) ?& !(~(has by archive) resource)
!(~(has by graphs) resource) !(~(has by graphs) resource)
== == == ==
=/ old-graph=(unit marked-graph:store)
(~(get by graphs) resource)
?> (validate-graph graph mark) ?> (validate-graph graph mark)
=/ clay-backup=(list card)
?~ old-graph ~
=/ =wire
backup+(en-path:res resource)
=/ =update:store
[%0 now.bowl %add-graph resource p.u.old-graph q.u.old-graph %.y]
=/ =cage
graph-update+!>(update)
=/ =soba:clay
[(welp wire /[(scot %da now.bowl)]/graph-update) ins+cage]~
[%pass wire %arvo %c %info %home &+soba]~
:_ %_ state :_ %_ state
graphs (~(put by graphs) resource [graph mark]) graphs (~(put by graphs) resource [graph mark])
update-logs (~(put by update-logs) resource (gas:orm-log ~ ~)) update-logs (~(put by update-logs) resource (gas:orm-log ~ ~))
@ -283,7 +270,6 @@
%- zing %- zing
:~ (give [/keys ~] %keys (~(put in ~(key by graphs)) resource)) :~ (give [/keys ~] %keys (~(put in ~(key by graphs)) resource))
(give [/updates ~] %add-graph resource *graph:store mark overwrite) (give [/updates ~] %add-graph resource *graph:store mark overwrite)
clay-backup
?~ mark ~ ?~ mark ~
?: (~(has in validators) u.mark) ~ ?: (~(has in validators) u.mark) ~
=/ wire /validator/[u.mark] =/ wire /validator/[u.mark]