The GitHub Actions job "Required Checks" on texera.git/feat/loop-message-ids 
has succeeded.
Run started by GitHub user aglinxinyuan (triggered by aglinxinyuan).

Head commit for run:
fa08044725ad32b6f886eb1e6e1f5fe8cf1a5ce2 / Xinyuan Lin <[email protected]>
feat(amber): later loop values win; loop messages go on

A later distinct state message from the same loop now replaces a loop
variable's value. A JVM operator's setting takes it until the setting
is bound, at the operator's first tuple or when one of its inputs ends,
and keeps the bound value after that, without failing; a Python
operator's loop_variables read the latest one. A value from an inner
loop still wins over an enclosing one's.

Copies of one message are dropped by its id, and an operator whose
process_state changes a loop's message, one stamped with its Loop
Start, sends that message on unchanged before the change, on both
engines. Where the loop body splits and meets again at Loop End or at
an operator with one input, the meeting operator then processes the
message before the change, so the other branch's copy is dropped
instead of undoing it. The operators after it run process_state on both
messages, so each operator in a row that changes the loop's message
doubles the messages that follow. A change is told from the same
message by its JSON, whatever the order of an object's keys, and an
operator that keeps the default process_state sends a state on without
serializing it: the JVM checks reference identity first, and Python
skips the JSON when the operator's bound process_state is the default
one.

A body operator always sends its loop's message on: when its
process_state returns None for a message stamped with its Loop Start,
the worker sends that message on unchanged, under its id, on both
engines, so the operators after it and Loop End still get it. A state
without the stamp is still dropped when process_state returns None, and
a Python process_state that raises sends nothing, as on the JVM. This
does not touch the loop boundaries: Loop End consumes its loop's
messages, and an inner Loop Start or Loop End passes the enclosing
loop's on.

A worker records the id of a message it processes only while it has an
output port. The engine runs the input ports that another port of an
operator depends on (the If's Condition port, a HashJoin's build side,
port 0 of a two-input Python UDF) in a phase of their own, before the
worker has any output port, so what it sends then reaches no one. The
copy of the loop's message on the operator's other port is therefore
processed again and sent on, and the loop runs all its iterations;
process_state runs on such a message once for each copy on the port
read first and once more on the other.

A Loop Start's runtime issues its message under an id that starts with
"loop-start-", which its copies keep. Loop End applies that message
first, whenever it arrives, and then every other distinct message of
its loop whole, in the order they arrived, so of two values of a name
the later wins: a branch that sends Loop Start's message on unchanged
cannot undo a change, and after a chain of operators that change the
loop's message, Loop End reads what the last one ended with for every
name its last message carries, and any other name keeps its value from
the last message that carried it. Of two branches that change different
names, the later branch's message wins for every name it carries. For
the next iteration Loop End saves Loop Start's names and the names the
update binds at top level when it runs, recorded by the namespace it
runs in. Modules, functions, classes and dunder names stay out of what
Loop Start sends and what Loop End saves. Loop End forgets an iteration
once its back-edge is written. An inner Loop End resets its output on
the first message of the enclosing loop it takes, once per outer
iteration, so every message of the outer loop that passes the inner
loop reaches the outer Loop End.

The built-in If passes on a state that does not carry its condition
and keeps its route, and takes the route of a later state that carries
it. Once states arrived, a tuple fails while none of them set the
route, naming the condition. A state whose condition is neither a
Boolean nor null fails when it arrives, as before, and while no state
set the route, a later tuple fails naming that value and its type.
Before any state, a tuple still takes the True port.

Report URL: https://github.com/apache/texera/actions/runs/42989754925

With regards,
GitHub Actions via GitBox

Reply via email to