Azure / Azure/azure-sdk-for-python

Prevent circular dependencies with singleton classes and logs

Abierto
#44,671 0 comentarios 0 reacciones 1 asignado Reclamado por @rads-1996 Ver en GitHub
Lenguaje dominante
Python
Estrellas
5.6k
Forks
3.4k
Merge medio
2 d 2 h
PR fusionados (30 d)
213

Descripción

[Discussion](https://github.com/Azure/azure-sdk-for-python/pull/44661#discussion_r2692435577)
[Example issue](https://github.com/langchain-ai/langchain-azure/issues/234)

The core of this issue is that logs that are produced during setup hit the Breeze or Performance Counter log record processor that may still be in the process of starting up. This can cause circular dependencies and permanent Singleton locks. While this issue has been prevented by reordering setup, we should explore some more root-level solutions. For instance, I think we should change Singleton accessing to return None if the lock is stuck. This would prevent a crash at the cost of a single log being uncounted for the given processor. Alternatively, we could change the Live Metric and Performance Counter processors to not rely on the manager singletons directly, but rather use another module that the singleton relies on, too. This way, the processors can be fully independent of the managers.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.