funcool

Georgiy Grigoryan 2024-11-12T06:50:14.942259Z

Hmm... still getting an error: (pxb/create :type :executor :concurrency 1 :queue 16 :executor (px/cached-executor))

Georgiy Grigoryan 2024-11-12T06:50:34.163909Z

=> Execution error (NullPointerException) at promesa.exec.bulkhead/create-with-executor (bulkhead.clj:173).

Georgiy Grigoryan 2024-11-12T07:00:33.678909Z

All right, I figured it out. Must supply :permits to pxb/create: This is the minimal example that works: (pxb/create _:type :executor_ _:permits_ 1) With no :executor provided ends up resolving java.util.concurrent.ForkJoinPool

Georgiy Grigoryan 2024-11-12T07:00:42.739939Z

Documentation on this seems to be out of date.

Georgiy Grigoryan 2024-11-12T07:06:31.500719Z

The error was happening when creating semaphore on this line: https://github.com/funcool/promesa/blob/be4ea194dfce9c1d39e39abed335be62c861c7f3/src/promesa/exec/bulkhead.clj#L176

Georgiy Grigoryan 2024-11-12T07:07:20.639499Z

If :permits not supplied end up with (int nil) which throws. Perhaps the intention was to use max-permits? Not sure though.

Georgiy Grigoryan 2024-11-12T07:11:07.324489Z

Judging from the code the correct and relevant keys for pxb/create are :type :executor :permits :queue .