mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-19 12:51:51 +03:00
Merge branch 'develop' into i/6404/next-kelvin-ci
This commit is contained in:
commit
529b113b3c
@ -1466,7 +1466,7 @@
|
|||||||
~/ %on-hear-packet
|
~/ %on-hear-packet
|
||||||
|= [=lane =packet dud=(unit goof)]
|
|= [=lane =packet dud=(unit goof)]
|
||||||
^+ event-core
|
^+ event-core
|
||||||
%- (ev-trace odd.veb sndr.packet |.("received packet"))
|
%- (ev-trace rcv.veb sndr.packet |.("received packet"))
|
||||||
::
|
::
|
||||||
?: =(our sndr.packet)
|
?: =(our sndr.packet)
|
||||||
event-core
|
event-core
|
||||||
@ -3440,6 +3440,15 @@
|
|||||||
++ closing (~(has in closing.peer-state) bone)
|
++ closing (~(has in closing.peer-state) bone)
|
||||||
++ corked (~(has in corked.peer-state) bone)
|
++ corked (~(has in corked.peer-state) bone)
|
||||||
++ pump-core |=(=^bone (mu bone *message-pump-state))
|
++ pump-core |=(=^bone (mu bone *message-pump-state))
|
||||||
|
++ received
|
||||||
|
|= =^bone
|
||||||
|
:: odd bone: %plea request message
|
||||||
|
:: even bone, 0 second bit: %boon response message
|
||||||
|
:: even bone, 1 second bit: nack-trace %boon message
|
||||||
|
::
|
||||||
|
?: =(1 (end 0 bone)) %plea
|
||||||
|
?: =(0 (end 0 (rsh 0 bone))) %boon
|
||||||
|
%nack
|
||||||
::
|
::
|
||||||
+| %entry-points
|
+| %entry-points
|
||||||
:: +call: handle a $message-sink-task
|
:: +call: handle a $message-sink-task
|
||||||
@ -3447,18 +3456,24 @@
|
|||||||
++ call
|
++ call
|
||||||
|= task=message-sink-task
|
|= task=message-sink-task
|
||||||
^+ sink
|
^+ sink
|
||||||
:: if we get a plea request and have corked this flow, always ack
|
|
||||||
::
|
|
||||||
?: corked
|
|
||||||
=? peer-core &(?=(%hear -.task) =(1 (end 0 bone)))
|
|
||||||
%- (mi-trace odd.veb |.("hear plea on a corked bone={<bone>}"))
|
|
||||||
%+ send-shut-packet bone
|
|
||||||
[message-num.shut-packet.task %| %| ok=& lag=*@dr]
|
|
||||||
sink
|
|
||||||
?- -.task
|
?- -.task
|
||||||
%drop sink(nax.state (~(del in nax.state) message-num.task))
|
%drop sink(nax.state (~(del in nax.state) message-num.task))
|
||||||
%done (done ok.task)
|
%done (done ok.task)
|
||||||
%hear (hear [lane shut-packet ok]:task)
|
::
|
||||||
|
%hear
|
||||||
|
?. ?| corked
|
||||||
|
?& %*(corked sink bone (mix 0b10 bone))
|
||||||
|
=(%nack (received bone))
|
||||||
|
== ==
|
||||||
|
(hear [lane shut-packet ok]:task)
|
||||||
|
:: if we %hear a task on a corked bone, always ack
|
||||||
|
::
|
||||||
|
=. peer-core
|
||||||
|
%+ send-shut-packet bone
|
||||||
|
[message-num.shut-packet.task %| %| ok=& lag=*@dr]
|
||||||
|
%. sink
|
||||||
|
%+ mi-trace odd.veb
|
||||||
|
|.("hear {<(received bone)>} on corked bone={<bone>}")
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
+| %tasks
|
+| %tasks
|
||||||
@ -3628,18 +3643,12 @@
|
|||||||
+| %implementation
|
+| %implementation
|
||||||
:: +handle-sink: dispatch message
|
:: +handle-sink: dispatch message
|
||||||
::
|
::
|
||||||
:: odd bone: %plea request message
|
|
||||||
:: even bone, 0 second bit: %boon response message
|
|
||||||
:: even bone, 1 second bit: nack-trace %boon message
|
|
||||||
::
|
|
||||||
++ handle-sink
|
++ handle-sink
|
||||||
|= [=message-num message=* ok=?]
|
|= [=message-num message=* ok=?]
|
||||||
|^ ^+ sink
|
^+ sink
|
||||||
?: =(1 (end 0 bone)) sink-plea
|
|^ ?-((received bone) %plea ha-plea, %boon ha-boon, %nack ha-nack)
|
||||||
?: =(0 (end 0 (rsh 0 bone))) sink-boon
|
::
|
||||||
sink-nack
|
++ ha-plea
|
||||||
:: XX FIXME: impure +abet pattern
|
|
||||||
++ sink-plea
|
|
||||||
^+ sink
|
^+ sink
|
||||||
?: |(closing corked) sink
|
?: |(closing corked) sink
|
||||||
%- %+ mi-trace msg.veb
|
%- %+ mi-trace msg.veb
|
||||||
@ -3673,7 +3682,7 @@
|
|||||||
=. closing.peer-state (~(put in closing.peer-state) bone)
|
=. closing.peer-state (~(put in closing.peer-state) bone)
|
||||||
(pe-emit duct %pass wire %a %plea her [%a /close ~])
|
(pe-emit duct %pass wire %a %plea her [%a /close ~])
|
||||||
::
|
::
|
||||||
:: +sink-boon: handle response message, acking unconditionally
|
:: +ha-boon: handle response message, acking unconditionally
|
||||||
::
|
::
|
||||||
:: .bone must be mapped in .ossuary.peer-state, or we crash.
|
:: .bone must be mapped in .ossuary.peer-state, or we crash.
|
||||||
:: This means a malformed message will kill a flow. We
|
:: This means a malformed message will kill a flow. We
|
||||||
@ -3687,7 +3696,7 @@
|
|||||||
:: TODO: This handles a previous crash in the client vane, but
|
:: TODO: This handles a previous crash in the client vane, but
|
||||||
:: not in %ames itself.
|
:: not in %ames itself.
|
||||||
::
|
::
|
||||||
++ sink-boon
|
++ ha-boon
|
||||||
^+ sink
|
^+ sink
|
||||||
?: |(closing corked) sink
|
?: |(closing corked) sink
|
||||||
%- %+ mi-trace msg.veb |.
|
%- %+ mi-trace msg.veb |.
|
||||||
@ -3708,7 +3717,7 @@
|
|||||||
::
|
::
|
||||||
(call %done ok=%.y)
|
(call %done ok=%.y)
|
||||||
::
|
::
|
||||||
++ sink-nack
|
++ ha-nack
|
||||||
^+ sink
|
^+ sink
|
||||||
:: if we get a naxplanation for a %cork, the publisher hasn't
|
:: if we get a naxplanation for a %cork, the publisher hasn't
|
||||||
:: received the OTA. The /recork timer will retry eventually.
|
:: received the OTA. The /recork timer will retry eventually.
|
||||||
|
Loading…
Reference in New Issue
Block a user