daml/libs-scala
Stephen Compall 81b4e17f00
reduce package service calls to avoid THREADPOOL_OVERLOADED errors (#16116)
* confirm that monadifying the package fetch still suppresses the error

* thread ExecutionContext from request

- makes the error less likely
- but still fairly easy to repro with 3 tabs

* experiment with setting executor

* explain that the cache isn't a cache

* random order, maybe

- #3090 mentions keeping the order as a goal; I don't see why we should,
  though

* random order with groups of 8

* embed the decoding

- this slows down the processing of a group, yielding somewhat less
  granular contention
- and also makes hits cost much less, at the cost of making granular
  contention more expensive

* reduce diff size before resolution

- this won't improve contention, but does nearly eliminate the cost of
  resolution for already-resolved packages, making hits nearly free
  (amortized)

* randomize groups instead

- while groups themselves can overlap with this arrangement, each
  costing ParallelLoadFactor granular contention, on average it seems to
  perform a little better due to groups never overlapping

* refactor StatusEnvelope to utils

* constant 250ms retry

* detect contention earlier and skip decode

* factor traverseFM
2023-01-26 10:18:13 -05:00
..
adjustable-clock bump copyright (#16002) 2023-01-04 18:21:15 +01:00
auth-utils bump copyright (#16002) 2023-01-04 18:21:15 +01:00
build-info bump copyright (#16002) 2023-01-04 18:21:15 +01:00
concurrent bump copyright (#16002) 2023-01-04 18:21:15 +01:00
contextualized-logging TraceId in LAPI [DPP-1372]. (#15995) 2023-01-24 23:10:51 +00:00
crypto bump copyright (#16002) 2023-01-04 18:21:15 +01:00
db-utils bump copyright (#16002) 2023-01-04 18:21:15 +01:00
doobie-slf4j bump copyright (#16002) 2023-01-04 18:21:15 +01:00
executors Simplify and split interface for executor services [PLEN-96] (#16139) 2023-01-24 19:57:58 +01:00
flyway-testing bump copyright (#16002) 2023-01-04 18:21:15 +01:00
fs-utils bump copyright (#16002) 2023-01-04 18:21:15 +01:00
gatling-utils bump copyright (#16002) 2023-01-04 18:21:15 +01:00
grpc-reverse-proxy bump copyright (#16002) 2023-01-04 18:21:15 +01:00
grpc-server-reflection-client bump copyright (#16002) 2023-01-04 18:21:15 +01:00
grpc-test-utils bump copyright (#16002) 2023-01-04 18:21:15 +01:00
grpc-utils bump copyright (#16002) 2023-01-04 18:21:15 +01:00
jwt bump copyright (#16002) 2023-01-04 18:21:15 +01:00
logging-entries bump copyright (#16002) 2023-01-04 18:21:15 +01:00
nameof bump copyright (#16002) 2023-01-04 18:21:15 +01:00
nonempty bump copyright (#16002) 2023-01-04 18:21:15 +01:00
nonempty-cats bump copyright (#16002) 2023-01-04 18:21:15 +01:00
oracle-testing bump copyright (#16002) 2023-01-04 18:21:15 +01:00
ports bump copyright (#16002) 2023-01-04 18:21:15 +01:00
postgresql-testing bump copyright (#16002) 2023-01-04 18:21:15 +01:00
resources bump copyright (#16002) 2023-01-04 18:21:15 +01:00
resources-akka bump copyright (#16002) 2023-01-04 18:21:15 +01:00
resources-grpc bump copyright (#16002) 2023-01-04 18:21:15 +01:00
safe-proto bump copyright (#16002) 2023-01-04 18:21:15 +01:00
scala-utils reduce package service calls to avoid THREADPOOL_OVERLOADED errors (#16116) 2023-01-26 10:18:13 -05:00
scalatest-utils bump copyright (#16002) 2023-01-04 18:21:15 +01:00
struct-json bump copyright (#16002) 2023-01-04 18:21:15 +01:00
test-evidence bump copyright (#16002) 2023-01-04 18:21:15 +01:00
timer-utils bump copyright (#16002) 2023-01-04 18:21:15 +01:00