JSON-RPC message handling blocks sending own messages #10268
Labels
area/distributed
Distributed monitoring (master, satellites, clients)
bug
Something isn't working
ref/NC
Describe the bug
Everything per each JSON-RPC connection runs mutually exclusive.
icinga2/lib/remote/jsonrpcconnection.cpp
Lines 55 to 58 in e50eb52
Something, like I/O itself, is async. Something, like queueing I/O, is pretty quick. But message handling itself is the slowest part and blocks the entire strand.
To Reproduce
icinga2/lib/remote/jsonrpcconnection.cpp
Lines 99 to 104 in e50eb52
Expected behavior
JsonRpcConnection should have a second strand. The following 33 lines should be a callback posted to the new strand.
icinga2/lib/remote/jsonrpcconnection.cpp
Lines 99 to 131 in e50eb52
As it's a strand AND only one thread posts at a time, this should keep messages handling serial, as the code expects.
But then handling wouldn't block I/O.
Your Environment
icinga2 --version
): e50eb52Additional context
ref/NC/820479
The text was updated successfully, but these errors were encountered: