BlockHound 将 WebClient 的 ExchangeFunction 的 .next() 方法检测为阻塞
BlockHound Detects WebClient's ExchangeFunction's .next() Method As Blocking
我正在使用 BlockHound
分析我的反应器应用程序。我的 ExchangeFunction
:
上有一个过滤器
@Override
public Mono<ClientResponse> filter(ClientRequest request, ExchangeFunction next) {
final ClientRequest.Builder builder = ClientRequest.from(request);
return Mono.defer(() -> next.exchange(builder.build())) //detects blocking call
.transform(reactiveUtil::contextualize)
.publishOn(Schedulers.parallel());
}
BlockHound
检测到 next.exchange()
上的阻塞调用。现在既然我使用 WebClient
和 Netty
,为什么这个调用是非阻塞的?在 elastic
线程上订阅此内容没有帮助。
根据您的要点,BlockHound 正在检测 java.io.FileInputStream.readBytes(..)
作为 SSL 握手中的深度阻塞。
此问题已在 https://github.com/reactor/reactor-netty/issues/939 中报告,似乎已在最新版本中解决。
我正在使用 BlockHound
分析我的反应器应用程序。我的 ExchangeFunction
:
@Override
public Mono<ClientResponse> filter(ClientRequest request, ExchangeFunction next) {
final ClientRequest.Builder builder = ClientRequest.from(request);
return Mono.defer(() -> next.exchange(builder.build())) //detects blocking call
.transform(reactiveUtil::contextualize)
.publishOn(Schedulers.parallel());
}
BlockHound
检测到 next.exchange()
上的阻塞调用。现在既然我使用 WebClient
和 Netty
,为什么这个调用是非阻塞的?在 elastic
线程上订阅此内容没有帮助。
根据您的要点,BlockHound 正在检测 java.io.FileInputStream.readBytes(..)
作为 SSL 握手中的深度阻塞。
此问题已在 https://github.com/reactor/reactor-netty/issues/939 中报告,似乎已在最新版本中解决。