daml/libs-scala
Stephen Compall b35c9fcb3d
slow down trigger on RESOURCE_EXHAUSTED failures (#7820)
* restate the submit stage as a Flow and derived Sink

* take submit out of the trigger-to-submit flow

* type for the failures produced directly by command submission

* directly connect the msgSource failure queue to the submitter output

* parens

* slow down submission as we exceed max parallel submissions

* restricting alterF so it will be usable with ConcurrentMap

* disable buffer for the delay

* split out the delay function

* drafting a retry loop

* degenerate test for retry loop, factoring the forAllFuture utility

* map input to retrying properly

* make retrying accessible to tests

* test happy path and fix off-by-one

* further tests for retrying

* reveal that elements can get lost

* more determinism in test

* let failures block further elements from being attempted

- Previously failures would go into a separate queue, where they awaited expiry
  of their delay and further initial upstream elements were given their first
  tries.  However, closing the upstream could mean that queue was dropped, and
  detecting that situation is not trivial.  So, instead, we don't use a separate
  queue.

* plug retrying into the trigger submission flow

* no changelog

CHANGELOG_BEGIN
CHANGELOG_END

* remove throttle; pendingCommandIds may leak

* report random parameter on failure

* revert comment about throttling

* explanation for fail in the error queue

- suggested by @cocreature; thanks
2020-11-10 21:36:48 +00:00
..
auth-utils Use com.daml as root package (#5343) 2020-04-05 19:49:57 +02:00
build-info Use com.daml as root package (#5343) 2020-04-05 19:49:57 +02:00
concurrent add silent_annotations option to da_scala bazel functions (#7668) 2020-10-13 15:44:16 +00:00
contextualized-logging add silent_annotations option to da_scala bazel functions (#7668) 2020-10-13 15:44:16 +00:00
flyway-testing Check trigger dao migrations digests (#7908) 2020-11-06 09:20:32 +00:00
gatling-utils Write report summary in text format (#7407) 2020-09-16 09:31:54 -04:00
grpc-utils Use com.daml as root package (#5343) 2020-04-05 19:49:57 +02:00
ports fix flaky 'restart triggers after shutdown' test (#6926) 2020-08-04 08:15:08 -04:00
postgresql-testing resources: Customizable contexts. (#7678) 2020-10-20 09:26:28 +00:00
resources resources: Customizable contexts. (#7678) 2020-10-20 09:26:28 +00:00
resources-akka resources: Customizable contexts. (#7678) 2020-10-20 09:26:28 +00:00
scala-utils Introduce //libs-scala/scala-utils (#6935) 2020-07-30 13:51:07 -04:00
scalatest-utils slow down trigger on RESOURCE_EXHAUSTED failures (#7820) 2020-11-10 21:36:48 +00:00
timer-utils timer-utils: Widen the bounds for duration checks. (#7760) 2020-10-21 12:19:27 +02:00