daml/triggers/tests
Stephen Compall 26d49d0a68
trigger request submissions backpressure the transaction stream (#7753)
* let free interpreter suspend on a SubmitRequest

* move UnfoldState to separate file, start a custom flow for flatmapping to it

* proper handlers, getting tangled in the mutable state of it all

* tests and conversion utilities for UnfoldState

* working UnfoldState flow with far fewer tricky details, passes test

* note on laziness

* missed t update

* test empty lists better

* add bifunctor for UnfoldState

* refactor message filtering

* split message parsing from the fold

* add copyright headers to new files

* let the flow from an UnfoldState emit the states

* test flatMapConcatStates's special output semantics

* pass submit's Future back to the holder of the SubmitRequest

* parallel submission stage, here with limit 8

* feed a stream of SubmitRequests to the command submission stage

* don't fail request submit stream stage on submit failure

- There was no way before for submission errors to report themselves to the free
  interpreter, which just saw Unit; now we don't drop the Future on the floor,
  so we properly turn "normal" submission errors into success, and actually
  propagate any "real" errors to the stream instead of logging.

* note that initialState command submissions are not throttled or backpressured

* add the parallel submission size to the failure queue size

- defense against deadlock should we later change to propagate enqueuing
  failures to the stream

* no changelog

CHANGELOG_BEGIN
CHANGELOG_END

* clean up the initial namespace of getTriggerSink
2020-10-23 10:00:38 -04:00
..
daml queryContractId and queryContractKey for high-level triggers (#7726) 2020-10-20 09:50:59 -04:00
scenarios queryContractId and queryContractKey for high-level triggers (#7726) 2020-10-20 09:50:59 -04:00
src/test/scala/com/digitalasset/daml/lf/engine/trigger/test trigger request submissions backpressure the transaction stream (#7753) 2020-10-23 10:00:38 -04:00
BUILD.bazel trigger request submissions backpressure the transaction stream (#7753) 2020-10-23 10:00:38 -04:00
list-triggers.sh replace DAML Authors with DA in copyright headers (#5228) 2020-03-27 01:26:10 +01:00