Closed Apehum closed 2 months ago
If the backend server doesn't have the PAPIProxyBridge plugin installed, formatPlaceholders will get stuck forever due to a deadlock caused by retries
You can reproduce this deadlock using the following example (using Kotlin):
import java.util.concurrent.CompletableFuture import java.util.concurrent.TimeUnit fun main() { test(3).get() } fun test(times: Int): CompletableFuture<Void> = CompletableFuture<Void>() .orTimeout(50L, TimeUnit.MILLISECONDS) .exceptionally { println("Test $times") test(times - 1).get() }
The easiest fix is to use exceptionallyAsync instead of exceptionally, but maybe you have better ideas on how to fix it
exceptionallyAsync
exceptionally
Fixed in #141
If the backend server doesn't have the PAPIProxyBridge plugin installed, formatPlaceholders will get stuck forever due to a deadlock caused by retries
You can reproduce this deadlock using the following example (using Kotlin):
The easiest fix is to use
exceptionallyAsync
instead ofexceptionally
, but maybe you have better ideas on how to fix it