mirror of
https://github.com/urbit/shrub.git
synced 2024-12-20 09:21:42 +03:00
clay: scry files at aeons, not timestamps
Turns out we can simply find the corresponding aeon in the nako.
This commit is contained in:
parent
2adc52e03a
commit
cdff1d91fa
@ -236,7 +236,7 @@
|
|||||||
=rave
|
=rave
|
||||||
scry=(unit @da) :: if scry, timeout
|
scry=(unit @da) :: if scry, timeout
|
||||||
have=(map lobe blob)
|
have=(map lobe blob)
|
||||||
need=(list $@(lobe [when=@da =path =lobe])) :: opt deets for scry
|
need=(list $@(lobe [=aeon =path =lobe])) :: opt deets for scry
|
||||||
nako=(qeu (unit nako))
|
nako=(qeu (unit nako))
|
||||||
busy=_|
|
busy=_|
|
||||||
==
|
==
|
||||||
@ -3166,16 +3166,14 @@
|
|||||||
++ missing-blobs
|
++ missing-blobs
|
||||||
|= =nako
|
|= =nako
|
||||||
=| miss=(set lobe)
|
=| miss=(set lobe)
|
||||||
^- (list [@da path lobe])
|
^- (list [aeon path lobe])
|
||||||
::REVIEW should this get sorted so that we prefer getting files
|
|
||||||
:: from the latest commit, if there are duplicates?
|
|
||||||
=/ yakis ~(tap in lar.nako)
|
=/ yakis ~(tap in lar.nako)
|
||||||
|- ^- (list [@da path lobe])
|
|- ^- (list [aeon path lobe])
|
||||||
=* yaki-loop $
|
=* yaki-loop $
|
||||||
?~ yakis
|
?~ yakis
|
||||||
~
|
~
|
||||||
=/ lobes=(list [=path =lobe]) ~(tap by q.i.yakis)
|
=/ lobes=(list [=path =lobe]) ~(tap by q.i.yakis)
|
||||||
|- ^- (list [@da path lobe])
|
|- ^- (list [aeon path lobe])
|
||||||
=* blob-loop $
|
=* blob-loop $
|
||||||
?~ lobes
|
?~ lobes
|
||||||
yaki-loop(yakis t.yakis)
|
yaki-loop(yakis t.yakis)
|
||||||
@ -3184,8 +3182,16 @@
|
|||||||
(~(has in miss) lobe)
|
(~(has in miss) lobe)
|
||||||
==
|
==
|
||||||
blob-loop(lobes t.lobes)
|
blob-loop(lobes t.lobes)
|
||||||
:- [t.i.yakis i.lobes]
|
=; =aeon
|
||||||
blob-loop(lobes t.lobes, miss (~(put in miss) lobe))
|
:- [aeon i.lobes]
|
||||||
|
blob-loop(lobes t.lobes, miss (~(put in miss) lobe))
|
||||||
|
:: find the aeon corresponding to the commit containing this lobe.
|
||||||
|
:: we unfortunately do not have a reverse lookup map.
|
||||||
|
::
|
||||||
|
=/ l=(list [a=aeon t=tako]) ~(tap by gar.nako)
|
||||||
|
|-
|
||||||
|
?~ l ~|([%missing-aeon-for-tako her syd `@uw`tako] !!)
|
||||||
|
?:(=(r.i.yakis t.i.l) a.i.l $(l t.l))
|
||||||
::
|
::
|
||||||
:: Receive backfill response
|
:: Receive backfill response
|
||||||
::
|
::
|
||||||
@ -3262,7 +3268,7 @@
|
|||||||
:: make the request over remote scry
|
:: make the request over remote scry
|
||||||
::
|
::
|
||||||
=/ =mood
|
=/ =mood
|
||||||
[%x da+when path]:i.need.sat
|
[%x ud+aeon path]:i.need.sat
|
||||||
[`- +]:(send-over-scry %back-index hen her inx syd mood)
|
[`- +]:(send-over-scry %back-index hen her inx syd mood)
|
||||||
:: otherwise, request over ames
|
:: otherwise, request over ames
|
||||||
::
|
::
|
||||||
|
Loading…
Reference in New Issue
Block a user