mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-26 08:56:21 +02:00
* fix: prevent duplicate dispatcher creation race condition in invoke_global_service Concurrent coroutines could all pass the `if key in self.dispatchers` check before any of them wrote the result back, because `await dispatcher.start()` yields to the event loop. This caused multiple Pulsar consumers to be created on the same shared subscription, distributing responses round-robin and dropping ~2/3 of them — manifesting as a permanent spinner in the Workbench UI. Apply a double-checked asyncio.Lock in both `invoke_global_service` and `invoke_flow_service` so only one dispatcher is ever created per service key. * test: add concurrent-dispatch tests for race condition fix Add asyncio.gather-based tests that verify invoke_global_service and invoke_flow_service create exactly one dispatcher under concurrent calls, preventing the duplicate Pulsar consumer bug. |
||
|---|---|---|
| .. | ||
| test_auth.py | ||
| test_config_receiver.py | ||
| test_dispatch_config.py | ||
| test_dispatch_manager.py | ||
| test_dispatch_mux.py | ||
| test_dispatch_requestor.py | ||
| test_dispatch_sender.py | ||
| test_dispatch_serialize.py | ||
| test_endpoint_constant.py | ||
| test_endpoint_manager.py | ||
| test_endpoint_metrics.py | ||
| test_endpoint_socket.py | ||
| test_endpoint_stream.py | ||
| test_endpoint_variable.py | ||
| test_rows_import_dispatcher.py | ||
| test_running.py | ||
| test_service.py | ||
| test_socket_graceful_shutdown.py | ||
| test_streaming_translators.py | ||
| test_text_document_translator.py | ||