Skip to content

Commit c2064ea

Browse files
DX-119909: offload settings reload from refresh loop
1 parent b249490 commit c2064ea

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/dremioai/servers/mcp.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,11 @@ async def _settings_refresh_loop():
565565
s = settings.instance()
566566
if s is None:
567567
continue
568-
settings.reload_mutable_settings_if_changed()
568+
# Config reload is typically a small local file read, so blocking the
569+
# event loop here would be an edge case. We still offload it to a
570+
# worker thread to keep the refresh loop non-blocking if config I/O
571+
# ever becomes unexpectedly slow.
572+
await asyncio.to_thread(settings.reload_mutable_settings_if_changed)
569573
current_settings = settings.instance()
570574
level_name = current_settings.get("log_level")
571575
logger_names = current_settings.loggers or []

0 commit comments

Comments
 (0)