Requests are queued by the completion queue thread and processed from the main
thread. A long running request, or an open progress dialog in the GUI, therefore
left every request unanswered for as long as that operation lasted, including
the liveness checks a client uses to decide whether ResInsight is still there.
Let a callback declare that it touches no application state, and serve those
directly on the completion queue thread instead of queueing them. GetVersion is
the only such callback, since it reads compile-time constants only. Everything
that touches the project or the data model is still processed on the main
thread, so no request can observe or modify the data model while another one is
running.
The allocated callback list is now used from both threads and is guarded by a
mutex. Shutdown takes a lock before flagging that it is in progress, so that it
waits for any dispatch already running on the completion queue thread and no new
request handler can be registered on a queue that is about to be shut down.
During a blocking call of 3.25 s, 65 pings were answered with a maximum latency
of 6.2 ms. Before this change none of them were answered until the call
completed.
Surface gRPC failure context to Python script authors instead of
silently returning sentinel values or raising bare gRPC errors.
- RipsError now carries code/details/location and a from_rpc_error()
helper. Existing single-arg construction stays valid.
- Stop swallowing grpc.RpcError in case.__grid_count for non-NOT_FOUND
failures and in instance._check_connection_and_version, so the
underlying status is propagated.
- pdmobject add_method decorator and _call_pdm_method_* attach
code/details to the raised RipsError; existing message text is
preserved so pytest match=... assertions keep working.
- Instance.start_heartbeat / stop_heartbeat / check_alive provide an
opt-in background ping that flips a sticky lost-connection flag and
raises a readable RipsError from check_alive() if the server dies.
- Server side: GetPdmObject in RiaGrpcAppService, RiaGrpcCaseService
and RiaGrpcProjectService no longer return Status::OK with an empty
reply when the underlying object is missing; they return NOT_FOUND
/ INTERNAL with a descriptive message. Other RiaGrpc*Service files
audited and already return non-OK with text on error paths.
* #7885 Update opm-common with optimized coordinate import
* #7885 Allow null as default result from a script method
* #7885 Propagate default parameter values to generated Python code
* #7885 Add CommandRouter as hub for worker methods
* #7885 Add support for use of CommadRouter from Python